You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
267 B
JavaScript
13 lines
267 B
JavaScript
4 years ago
|
const user = require('../model/user');
|
||
|
|
||
|
async function run({
|
||
|
uid,
|
||
|
}) {
|
||
|
uid = parseInt(uid);
|
||
|
if (Number.isNaN(uid)) throw new Error('uid');
|
||
|
await user.setSuperAdmin(uid);
|
||
|
return uid;
|
||
|
}
|
||
|
|
||
|
global.Hydro.script.setSuperadmin = module.exports = { run };
|