Use (Transaction|LazyValue).get_json() instead of logjson.logjson_to_json() and ...
[ndcode_site.git] / api / globals / set.json.jst
index 5f986aa..d8fc5be 100644 (file)
@@ -1,4 +1,3 @@
-let logjson = (await import('@ndcode/logjson')).default
 let XDate = require('xdate')
 
 return async env => {
@@ -35,14 +34,10 @@ return async env => {
         let account = await (
           await root.get('accounts', {})
         ).get(env.signed_in_as)
-        if (
-          !await logjson.logjson_to_json(
-            await account.get('administrator')
-          )
-        )
+        if (!await account.get_json('administrator'))
           throw new Problem('Unauthorized', 'Not administrator.', 401)
 
-        root.set('globals', transaction.json_to_logjson(globals))
+        root.set_json('globals', globals)
         await transaction.commit()
       }
       catch (error) {