new page layout

This commit is contained in:
2025-12-10 00:58:38 +00:00
parent 21eeb351c8
commit b6c9d8d80f
13 changed files with 111 additions and 34 deletions

View File

@@ -135,6 +135,28 @@ func (store *Store) DeleteUser(ctx *gin.Context) {
return
}
store.DB.Delete(&user)
tx := store.DB.Delete(&user)
if tx.Error != nil {
ctx.JSON(http.StatusInternalServerError, tx.Error.Error())
return
}
ctx.SetCookie(
"access_token",
"",
-1,
store.Auth.Config.Endpoint,
store.Auth.Config.Domain,
true, true,
)
ctx.SetCookie(
"refresh_token",
"",
-1,
store.Auth.Config.Endpoint,
store.Auth.Config.Domain,
true, true,
)
ctx.JSON(http.StatusOK, user)
}