add role on register
This commit is contained in:
parent
9f8feb5e40
commit
3ec9ef0c91
@ -12,9 +12,9 @@ export const registerUser = async ({ username, regtime, role, email, id, ...rest
|
|||||||
const [registred] = await usersCl.find({ ijlId: id }).toArray()
|
const [registred] = await usersCl.find({ ijlId: id }).toArray()
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
|
role: Roles.User,
|
||||||
...(registred || {}),
|
...(registred || {}),
|
||||||
ijlId: id,
|
ijlId: id,
|
||||||
role: Roles.User,
|
|
||||||
ijlUser: {
|
ijlUser: {
|
||||||
username,
|
username,
|
||||||
regtime,
|
regtime,
|
||||||
|
Loading…
Reference in New Issue
Block a user