Browse Source

serve app assets

gh-pages
Martin McKeaveney 6 years ago
parent
commit
c7a4503dd2
  1. 10
      packages/server/src/api/controllers/static/index.js

10
packages/server/src/api/controllers/static/index.js

@ -190,15 +190,7 @@ exports.serveAttachment = async function(ctx) {
exports.serveAppAsset = async function(ctx) {
// default to homedir
const mainOrAuth =
ctx.auth.authenticated === AuthTypes.APP ? "main" : "unauthenticated"
const appPath = resolve(
budibaseAppsDir(),
ctx.user.appId,
"public",
mainOrAuth
)
const appPath = resolve(budibaseAppsDir(), ctx.user.appId, "public")
await send(ctx, ctx.file, { root: ctx.devPath || appPath })
}

Loading…
Cancel
Save