mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Initialize playwright, fix file upload issue, show publication status and delete website dir on website deletion
This commit is contained in:
@@ -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" };
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user