feat: move some stuff around
This commit is contained in:
@ -14,6 +14,17 @@ export const menus: Record<string, Menu> = {
|
||||
},
|
||||
visible: () => false,
|
||||
},
|
||||
{
|
||||
title: "Clear Cache",
|
||||
cb: async (state) => {
|
||||
state.activeState.value = "loading";
|
||||
await fetch("/api/cache", {
|
||||
method: "DELETE",
|
||||
});
|
||||
state.activeState.value = "normal";
|
||||
state.visible.value = false;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Add Movie infos",
|
||||
meta: "",
|
||||
@ -23,10 +34,6 @@ export const menus: Record<string, Menu> = {
|
||||
|
||||
const query = movie.name;
|
||||
|
||||
// if (movie.meta.author) {
|
||||
// query += movie.meta.author;
|
||||
// }
|
||||
|
||||
const response = await fetch(
|
||||
`/api/tmdb/query?q=${encodeURIComponent(query)}`,
|
||||
);
|
||||
@ -41,7 +48,7 @@ export const menus: Record<string, Menu> = {
|
||||
title: `${m.title} released ${m.release_date}`,
|
||||
cb: async () => {
|
||||
state.activeState.value = "loading";
|
||||
await fetch(`/api/movies/${movie.name}/`, {
|
||||
await fetch(`/api/movies/enhance/${movie.name}/`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ tmdbId: m.id }),
|
||||
});
|
||||
|
Reference in New Issue
Block a user