migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
+32
-31
@@ -1,41 +1,13 @@
|
||||
import assert from 'node:assert';
|
||||
import AuditSource from '../auditsource.js';
|
||||
import BoxError from '../boxerror.js';
|
||||
import * as groups from '../groups.js';
|
||||
import groups from '../groups.js';
|
||||
import { HttpError } from '@cloudron/connect-lastmile';
|
||||
import { HttpSuccess } from '@cloudron/connect-lastmile';
|
||||
import safe from 'safetydance';
|
||||
import * as users from '../users.js';
|
||||
import * as _ from '../underscore.js';
|
||||
import users from '../users.js';
|
||||
import _ from '../underscore.js';
|
||||
|
||||
export {
|
||||
get,
|
||||
list,
|
||||
add,
|
||||
del,
|
||||
|
||||
setRole,
|
||||
setActive,
|
||||
getAvatar,
|
||||
setAvatar,
|
||||
unsetAvatar,
|
||||
updateProfile,
|
||||
|
||||
setPassword,
|
||||
verifyPassword,
|
||||
setLocalGroups,
|
||||
setGhost,
|
||||
|
||||
getPasswordResetLink,
|
||||
sendPasswordResetEmail,
|
||||
|
||||
getInviteLink,
|
||||
sendInviteEmail,
|
||||
|
||||
disableTwoFactorAuthentication,
|
||||
|
||||
load
|
||||
};
|
||||
|
||||
async function load(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.userId, 'string');
|
||||
@@ -311,3 +283,32 @@ async function sendInviteEmail(req, res, next) {
|
||||
|
||||
next(new HttpSuccess(202, {}));
|
||||
}
|
||||
|
||||
export default {
|
||||
get,
|
||||
list,
|
||||
add,
|
||||
del,
|
||||
|
||||
setRole,
|
||||
setActive,
|
||||
getAvatar,
|
||||
setAvatar,
|
||||
unsetAvatar,
|
||||
updateProfile,
|
||||
|
||||
setPassword,
|
||||
verifyPassword,
|
||||
setLocalGroups,
|
||||
setGhost,
|
||||
|
||||
getPasswordResetLink,
|
||||
sendPasswordResetEmail,
|
||||
|
||||
getInviteLink,
|
||||
sendInviteEmail,
|
||||
|
||||
disableTwoFactorAuthentication,
|
||||
|
||||
load
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user