diff options
| author | Fuwn <[email protected]> | 2024-07-22 16:00:33 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-07-22 16:00:33 -0700 |
| commit | a7fe390be2b812e77395738eba395835dc45f007 (patch) | |
| tree | d821839a4bc0eb8f90e676a24595f49bc716c295 /src/lib/Data/Birthday/secondary.ts | |
| parent | fix(SequelSpy): use LinkedTooltip (diff) | |
| download | due.moe-a7fe390be2b812e77395738eba395835dc45f007.tar.xz due.moe-a7fe390be2b812e77395738eba395835dc45f007.zip | |
refactor(Birthday): rename modules
Diffstat (limited to 'src/lib/Data/Birthday/secondary.ts')
| -rw-r--r-- | src/lib/Data/Birthday/secondary.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/Data/Birthday/secondary.ts b/src/lib/Data/Birthday/secondary.ts new file mode 100644 index 00000000..8a9322b1 --- /dev/null +++ b/src/lib/Data/Birthday/secondary.ts @@ -0,0 +1,20 @@ +import root from '$lib/Utility/root'; + +export interface ACDBBirthday { + character_image: string; + name: string; + origin: string; +} + +export const ACDBBirthdays = async (month: number, day: number): Promise<ACDBBirthday[]> => + ( + await ( + await fetch(root(`/api/birthdays/secondary?month=${month}&day=${day}`), { + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0' + } + }) + ).json() + )['characters']; |