Skip to content

Commit a6fbd2f

Browse files
committed
fix(user): remove password from context payload if nil
1 parent 37b0ee7 commit a6fbd2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/user/user.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
func encryptPassword(ctx *cosy.Ctx[model.User]) {
1414
if ctx.Payload["password"] == nil {
15+
delete(ctx.Payload, "password")
1516
return
1617
}
1718
pwd := ctx.Payload["password"].(string)

0 commit comments

Comments
 (0)