Skip to content

Commit 0dac280

Browse files
committed
Merge branch 'feature/clone-template'
2 parents 62cc6c6 + 9a5a850 commit 0dac280

22 files changed

Lines changed: 4946 additions & 10 deletions

apps/dashboard-api/src/controllers/project.controller.js

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -745,16 +745,30 @@ module.exports.updateExternalConfig = async (req, res) => {
745745
}
746746
}
747747

748-
if (storageUrl && storageKey) {
749-
const storageConfig = {
750-
storageUrl,
751-
storageKey,
752-
storageProvider: storageProvider || "supabase",
753-
};
754-
updateData["resources.storage.config"] = encrypt(
755-
JSON.stringify(storageConfig),
756-
);
757-
updateData["resources.storage.isExternal"] = true;
748+
if (storageProvider === "supabase" || (!storageProvider && storageUrl && storageKey)) {
749+
if (storageUrl && storageKey) {
750+
const storageConfig = {
751+
storageUrl,
752+
storageKey,
753+
storageProvider: "supabase",
754+
};
755+
updateData["resources.storage.config"] = encrypt(JSON.stringify(storageConfig));
756+
updateData["resources.storage.isExternal"] = true;
757+
}
758+
} else if (["s3", "cloudflare_r2", "gcs"].includes(storageProvider)) {
759+
if (validatedData.s3AccessKeyId && validatedData.s3SecretAccessKey && validatedData.s3Bucket) {
760+
const storageConfig = {
761+
storageProvider,
762+
accessKeyId: validatedData.s3AccessKeyId,
763+
secretAccessKey: validatedData.s3SecretAccessKey,
764+
region: validatedData.s3Region,
765+
endpoint: validatedData.s3Endpoint,
766+
bucket: validatedData.s3Bucket,
767+
publicUrlHost: validatedData.publicUrlHost,
768+
};
769+
updateData["resources.storage.config"] = encrypt(JSON.stringify(storageConfig));
770+
updateData["resources.storage.isExternal"] = true;
771+
}
758772
}
759773

760774
const project = await Project.findOneAndUpdate(
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": 3,
3+
"routes": [
4+
{
5+
"handle": "filesystem"
6+
},
7+
{
8+
"src": "^/_astro/(.*)$",
9+
"headers": {
10+
"cache-control": "public, max-age=31536000, immutable"
11+
},
12+
"continue": true
13+
},
14+
{
15+
"src": "^/.*$",
16+
"dest": "/404.html",
17+
"status": 404
18+
}
19+
]
20+
}

apps/landing/.vercel/output/static/404.html

Lines changed: 19 additions & 0 deletions
Large diffs are not rendered by default.
138 KB
Loading

apps/landing/.vercel/output/static/_astro/Hyperspeed.yI-RiApA.js

Lines changed: 4383 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/landing/.vercel/output/static/_astro/MagicBento.uA1weagR.js

Lines changed: 94 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/landing/.vercel/output/static/_astro/OrbitSection.Dd5_q2xi.js

Lines changed: 236 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/landing/.vercel/output/static/_astro/StudioReplay.Bvvd5Fn1.js

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)