Clear user appointments on unregister

This commit is contained in:
daru
2022-05-28 14:28:58 +02:00
parent 864aa5695a
commit d9ab365ae4
2 changed files with 54 additions and 2 deletions

10
ober.go
View File

@@ -484,8 +484,14 @@ func UnRegister(ctx *fasthttp.RequestCtx) {
err = DeleteUserFromAnimes(register.MalID)
if err != nil {
if err != nutsdb.ErrBucketEmpty {
ctx.WriteString(err.Error())
ctx.SetStatusCode(fasthttp.StatusNotFound)
addErrorToCtx(ctx, err)
return
}
}
err = DeleteUserFromAppointmens(register.Username)
if err != nil {
if err != nutsdb.ErrBucketEmpty {
addErrorToCtx(ctx, err)
return
}
}