serve app assets
This commit is contained in:
parent
f386d0c72b
commit
c7a4503dd2
|
@ -190,15 +190,7 @@ exports.serveAttachment = async function(ctx) {
|
||||||
|
|
||||||
exports.serveAppAsset = async function(ctx) {
|
exports.serveAppAsset = async function(ctx) {
|
||||||
// default to homedir
|
// default to homedir
|
||||||
const mainOrAuth =
|
const appPath = resolve(budibaseAppsDir(), ctx.user.appId, "public")
|
||||||
ctx.auth.authenticated === AuthTypes.APP ? "main" : "unauthenticated"
|
|
||||||
|
|
||||||
const appPath = resolve(
|
|
||||||
budibaseAppsDir(),
|
|
||||||
ctx.user.appId,
|
|
||||||
"public",
|
|
||||||
mainOrAuth
|
|
||||||
)
|
|
||||||
|
|
||||||
await send(ctx, ctx.file, { root: ctx.devPath || appPath })
|
await send(ctx, ctx.file, { root: ctx.devPath || appPath })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue