add role on register

This commit is contained in:
Primakov Alexandr Alexandrovich 2022-04-23 21:05:58 +03:00
parent 9f8feb5e40
commit 3ec9ef0c91

View File

@ -12,9 +12,9 @@ export const registerUser = async ({ username, regtime, role, email, id, ...rest
const [registred] = await usersCl.find({ ijlId: id }).toArray()
const user = {
role: Roles.User,
...(registred || {}),
ijlId: id,
role: Roles.User,
ijlUser: {
username,
regtime,