mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-12 09:03:42 +08:00
merge upstream
Signed-off-by: wozulong <>
This commit is contained in:
@@ -558,6 +558,14 @@ func HardDeleteUser(c *gin.Context) {
|
||||
}
|
||||
|
||||
func DeleteSelf(c *gin.Context) {
|
||||
if !common.UserSelfDeletionEnabled {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
"message": "当前设置不允许用户自我删除账号",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
id := c.GetInt("id")
|
||||
user, _ := model.GetUserById(id, false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user