migrate to "export default"

also, set no-use-before-define in linter
This commit is contained in:
Girish Ramakrishnan
2026-02-14 15:43:24 +01:00
parent ddb46646fa
commit 36aa641cb9
231 changed files with 2846 additions and 2728 deletions
+32 -31
View File
@@ -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
};