This commit is contained in:
Sakurasan
2025-02-01 23:52:55 +08:00
parent 65d6d12972
commit bc223d6530
30 changed files with 2683 additions and 242 deletions

View File

@@ -42,7 +42,7 @@ func Handleinit(c *gin.Context) {
})
return
}
if user.ID == uint(1) {
if user.ID == 1 {
c.JSON(http.StatusForbidden, gin.H{
"error": "super user already exists, use cli to reset password",
})

View File

@@ -82,7 +82,7 @@ func HandleResetUserToken(c *gin.Context) {
c.JSON(http.StatusForbidden, gin.H{"error": err.Error()})
return
}
if u.ID == uint(1) {
if u.ID == 1 {
rootToken = u.Token
}
c.JSON(http.StatusOK, u)