feat: refactor whole bunch of stuff
This commit is contained in:
@@ -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;
|
||||
},
|
||||
};
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user