Function
getEntryByMalId
(
type: 'anime' | 'manga',
malId: number,
)
Source from the content-addressed store, hash-verified
| 151 | } |
| 152 | |
| 153 | export async function getEntryByMalId( |
| 154 | type: 'anime' | 'manga', |
| 155 | malId: number, |
| 156 | ): Promise<undefined | Entry> { |
| 157 | const table = type === 'anime' ? db.table('anime') : db.table('manga'); |
| 158 | return table.get({ malId }); |
| 159 | } |
| 160 | |
| 161 | export async function removeEntry(type: 'anime' | 'manga', uid: number | string) { |
| 162 | const table = type === 'anime' ? db.table('anime') : db.table('manga'); |
Tested by
no test coverage detected