correct put call to not remove password 😅
This commit is contained in:
parent
7c2b5e1858
commit
eec2c4de7c
|
@ -9,7 +9,7 @@
|
|||
|
||||
<div class="inputs">
|
||||
<Input
|
||||
disabled={!editMode}
|
||||
disabled
|
||||
thin
|
||||
bind:value={user.username}
|
||||
name="Name"
|
||||
|
|
|
@ -66,8 +66,10 @@ exports.create = async function(ctx) {
|
|||
exports.update = async function (ctx) {
|
||||
const db = new CouchDB(ctx.user.instanceId)
|
||||
const user = ctx.request.body
|
||||
const dbUser = db.get(ctx.request.body._id)
|
||||
const newData = { ...dbUser, ...user }
|
||||
|
||||
const response = await db.put(user)
|
||||
const response = await db.put(newData)
|
||||
user._rev = response.rev
|
||||
|
||||
ctx.status = 200
|
||||
|
|
Loading…
Reference in New Issue