config in context
This commit is contained in:
parent
2c03ac761c
commit
19e5be19bf
|
@ -23,7 +23,7 @@ router.get("/_builder/api/:appname/appPackage", async ctx => {
|
|||
router
|
||||
.post("/_builder/api/:appname/backend", async ctx => {
|
||||
await saveBackend(
|
||||
config,
|
||||
ctx.config,
|
||||
ctx.params.appname,
|
||||
ctx.request.body.appDefinition,
|
||||
ctx.request.body.accessLevels
|
||||
|
|
|
@ -22,6 +22,7 @@ module.exports = (config, app) => {
|
|||
.use(async (ctx, next) => {
|
||||
ctx.sessionId = ctx.session._sessCtx.externalKey
|
||||
ctx.session.accessed = true
|
||||
ctx.config = config
|
||||
|
||||
const pathParts = ctx.path.split("/")
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ const router = Router();
|
|||
router.get("/_builder/api/:appname/components", async ctx => {
|
||||
try {
|
||||
ctx.body = getComponentDefinitions(
|
||||
config,
|
||||
ctx.config,
|
||||
ctx.params.appname,
|
||||
ctx.query.lib
|
||||
)
|
||||
|
@ -27,7 +27,7 @@ router.get("/_builder/api/:appname/components", async ctx => {
|
|||
|
||||
router.get("/_builder/api/:appname/componentlibrary", async ctx => {
|
||||
const info = await componentLibraryInfo(
|
||||
config,
|
||||
ctx.config,
|
||||
ctx.params.appname,
|
||||
ctx.query.lib ? decodeURI(ctx.query.lib) : ""
|
||||
)
|
||||
|
@ -37,7 +37,7 @@ router.get("/_builder/api/:appname/componentlibrary", async ctx => {
|
|||
|
||||
router.get("/_builder/:appname/componentlibrary", async ctx => {
|
||||
const info = await componentLibraryInfo(
|
||||
config,
|
||||
ctx.config,
|
||||
ctx.params.appname,
|
||||
ctx.query.lib
|
||||
)
|
||||
|
|
|
@ -59,7 +59,7 @@ router
|
|||
|
||||
router.post("/_builder/api/:appname/pages/:pageName", async ctx => {
|
||||
await buildPage(
|
||||
config,
|
||||
ctx.config,
|
||||
ctx.params.appname,
|
||||
ctx.params.pageName,
|
||||
ctx.request.body
|
||||
|
|
Loading…
Reference in New Issue