1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

Merge branch 'user-app-list' of github.com:Budibase/budibase into user-app-list

This commit is contained in:
Andrew Kingston 2021-05-19 13:31:27 +01:00
commit 3bd5da084c
2 changed files with 6 additions and 3 deletions

View file

@ -102,6 +102,9 @@ exports.self = async ctx => {
if (ctx.request.body.password) {
ctx.request.body.password = await hash(ctx.request.body.password)
}
// don't allow sending up an ID/Rev, always use the existing one
delete ctx.request.body._id
delete ctx.request.body._rev
const response = await db.put({
...user,
...ctx.request.body,

View file

@ -7,10 +7,10 @@ const router = Router()
function buildUserSaveValidation(isSelf = false) {
let schema = {
email: Joi.string(),
email: Joi.string().allow(null, ""),
password: Joi.string().allow(null, ""),
firstName: Joi.string(),
lastName: Joi.string(),
firstName: Joi.string().allow(null, ""),
lastName: Joi.string().allow(null, ""),
builder: Joi.object({
global: Joi.boolean().optional(),
apps: Joi.array().optional(),