feat: refactor whole bunch of stuff

This commit is contained in:
Max Richter
2025-11-02 19:03:11 +01:00
parent 81ebc8f5e0
commit e6b90cb785
56 changed files with 753 additions and 360 deletions

View File

@@ -1,8 +1,8 @@
import { MenuEntry } from "@islands/KMenu/types.ts";
import { TMDBMovie } from "@lib/types.ts";
import { debounce } from "@lib/helpers.ts";
import { Movie } from "@lib/resource/movies.ts";
import { getCookie } from "@lib/string.ts";
import { ReviewResource } from "@lib/marka/schema.ts";
export const createNewMovie: MenuEntry = {
title: "Create new movie",
@@ -52,9 +52,9 @@ export const createNewMovie: MenuEntry = {
const response = await fetch("/api/movies/" + r.id, {
method: "POST",
});
const movie = await response.json() as Movie;
const movie = await response.json() as ReviewResource;
unsub();
window.location.href = "/movies/" + movie.name;
globalThis.location.href = "/movies/" + movie.name;
},
};
}),