feat: add authentication

This commit is contained in:
2023-08-04 22:35:25 +02:00
parent f9638c35fc
commit 469db6525d
33 changed files with 492 additions and 100 deletions

View File

@@ -15,7 +15,7 @@ export function getMovieCredits(id: number) {
}
export async function getMoviePoster(id: string): Promise<ArrayBuffer> {
const cachedPoster = await cache.get("posters/" + id);
const cachedPoster = await cache.get("posters:" + id);
if (cachedPoster) return cachedPoster as ArrayBuffer;
@@ -23,6 +23,6 @@ export async function getMoviePoster(id: string): Promise<ArrayBuffer> {
const response = await fetch(posterUrl);
const poster = await response.arrayBuffer();
cache.set(`posters/${id}`, new Uint8Array());
cache.set(`posters:${id}`, new Uint8Array());
return poster;
}