upgrading accesslevels
This commit is contained in:
parent
ca026e6017
commit
ddf302f33a
|
@ -1,8 +1,9 @@
|
|||
const StatusCodes = require("../../utilities/statusCodes")
|
||||
|
||||
module.exports = async ctx => {
|
||||
const existingAccessLevels = await ctx.instance.authApi.loadAccessLevels()
|
||||
const accessLevels = ctx.request.body.accessLevels
|
||||
accessLevels.version = 0
|
||||
accessLevels.version = existingAccessLevels.version
|
||||
await ctx.instance.authApi.saveAccessLevels(accessLevels)
|
||||
await ctx.instance.templateApi.upgradeData(ctx.request.body.newHierarchy)
|
||||
ctx.response.status = StatusCodes.OK
|
||||
|
|
Loading…
Reference in New Issue