Update policies for collaborators for stricter rules

This commit is contained in:
thiloho
2024-08-08 16:30:01 +02:00
parent bcc26322d3
commit 837729c83c
8 changed files with 85 additions and 26 deletions

View File

@@ -81,15 +81,9 @@ const generateStaticFiles = async (websiteData: any, isPreview: boolean = true)
let uploadDir = "";
if (isPreview) {
uploadDir = join(
process.cwd(),
"static",
"user-websites",
websiteData.owner_id,
websiteData.id
);
uploadDir = join(process.cwd(), "static", "user-websites", websiteData.user_id, websiteData.id);
} else {
uploadDir = join("/", "var", "www", "archtika-websites", websiteData.owner_id, websiteData.id);
uploadDir = join("/", "var", "www", "archtika-websites", websiteData.user_id, websiteData.id);
}
await mkdir(uploadDir, { recursive: true });