feat: add authentication
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user