diff --git a/src/routes/v1/auth.controller.ts b/src/routes/v1/auth.controller.ts index fd40558..e8a0689 100644 --- a/src/routes/v1/auth.controller.ts +++ b/src/routes/v1/auth.controller.ts @@ -3,6 +3,7 @@ import { Db } from 'mongodb' import { mainDb } from '../../utils/mongo' import { cleanId } from '../../utils/common' import { usersCollection } from '../../__data__/constants' +import { Roles } from '../../model/roles' export const registerUser = async ({ username, regtime, role, email, id, ...rest }) => { const db: Db = await mainDb @@ -13,6 +14,7 @@ export const registerUser = async ({ username, regtime, role, email, id, ...rest const user = { ...(registred || {}), ijlId: id, + role: Roles.User, ijlUser: { username, regtime,