Watts-Lab/surveyor

Checking wrong collection for admin creation

Closed this issue · 0 comments

  const oldUser = await Db_Wrapper.find({username}, "**researchers**")
  if (!oldUser) {
    return res.status(409).send("User exists. please login or create new user")
  }

  const encryptPass = await bycrpyt.hash(password, 10)
  await Db_Wrapper.insert({username, "password": encryptPass}, "internalUsersSurveyor")