2020-03-24 11:56:48 +01:00
|
|
|
const StatusCodes = require("../../utilities/statusCodes")
|
|
|
|
|
|
|
|
module.exports = async ctx => {
|
2020-03-27 15:49:43 +01:00
|
|
|
const accessLevels = ctx.request.body.accessLevels
|
|
|
|
accessLevels.version = 0
|
|
|
|
await ctx.instance.authApi.saveAccessLevels(accessLevels)
|
2020-03-24 11:56:48 +01:00
|
|
|
await ctx.instance.templateApi.upgradeData(ctx.request.body.newHierarchy)
|
|
|
|
ctx.response.status = StatusCodes.OK
|
|
|
|
}
|