diff options
| author | Fuwn <[email protected]> | 2023-08-30 17:17:21 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-30 17:17:21 -0700 |
| commit | 6cd7a9b774d28d5d478b203560297c332c9d2f0b (patch) | |
| tree | 22cf10d1da4dc082547f3bf868ec9d52d8924d42 /src | |
| parent | fix(mangadex): better manga identification (diff) | |
| download | due.moe-6cd7a9b774d28d5d478b203560297c332c9d2f0b.tar.xz due.moe-6cd7a9b774d28d5d478b203560297c332c9d2f0b.zip | |
fix(mangadex): add types
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/mangadex/manga/+server.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/mangadex/manga/+server.ts b/src/routes/mangadex/manga/+server.ts index 8c25163f..5bfa1882 100644 --- a/src/routes/mangadex/manga/+server.ts +++ b/src/routes/mangadex/manga/+server.ts @@ -1,6 +1,6 @@ export const GET = async ({ url }) => { - const nullIfNullString = (s) => (s === 'null' ? null : s); - const get = async (title) => { + const nullIfNullString = (s: string | null) => (s == 'null' ? null : s); + const get = async (title: string) => { return await ( await fetch( `https://api.mangadex.org/manga?title=${encodeURIComponent( |