Initialize playwright, fix file upload issue, show publication status and delete website dir on website deletion

This commit is contained in:
thiloho
2024-08-30 15:48:15 +02:00
parent 8915a7cfd9
commit bb73c2350d
15 changed files with 284 additions and 41 deletions

View File

@@ -1,5 +1,7 @@
import type { Actions, PageServerLoad } from "./$types";
import { API_BASE_PREFIX } from "$lib/server/utils";
import { rm } from "node:fs/promises";
import { join } from "node:path";
export const load: PageServerLoad = async ({ fetch, cookies, url, locals }) => {
const searchQuery = url.searchParams.get("website_search_query");
@@ -130,6 +132,11 @@ export const actions: Actions = {
return { success: false, message: response.message };
}
await rm(join("/", "var", "www", "archtika-websites", data.get("id") as string), {
recursive: true,
force: true
});
return { success: true, message: "Successfully deleted website" };
}
};