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:
@@ -54,6 +54,22 @@ export const actions: Actions = {
|
||||
const websiteOverview = await websiteOverviewData.json();
|
||||
generateStaticFiles(websiteOverview, false);
|
||||
|
||||
const res = await fetch(`${API_BASE_PREFIX}/website?id=eq.${params.websiteId}`, {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${cookies.get("session_token")}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
is_published: true
|
||||
})
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
const response = await res.json();
|
||||
return { success: false, message: response.message };
|
||||
}
|
||||
|
||||
return { success: true, message: "Successfully published website" };
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user