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

@@ -1,6 +1,7 @@
import { MenuEntry } from "@islands/KMenu/types.ts";
import { Movie } from "@lib/resource/movies.ts";
import { TMDBMovie } from "@lib/types.ts";
import { getCookie } from "@lib/string.ts";
export const addMovieInfos: MenuEntry = {
title: "Add Movie infos",
@@ -43,6 +44,7 @@ export const addMovieInfos: MenuEntry = {
},
visible: () => {
const loc = globalThis["location"];
if (!getCookie("session_cookie")) return false;
return loc?.pathname?.includes("movie");
},
};