api: Return NoContent on delete actions

This commit is contained in:
nemunaire 2023-01-03 09:09:58 +01:00
parent b4da1e0a69
commit dd67032e5d
3 changed files with 4 additions and 4 deletions

View File

@ -224,5 +224,5 @@ func delDomain(c *gin.Context) {
return
}
c.JSON(http.StatusOK, true)
c.JSON(http.StatusNoContent, true)
}

View File

@ -127,7 +127,7 @@ func logout(opts *config.Options, c *gin.Context) {
opts.DevProxy == "" && !strings.HasPrefix(opts.ExternalURL, "http://"),
true,
)
c.JSON(http.StatusOK, true)
c.JSON(http.StatusNoContent, true)
}
type loginForm struct {

View File

@ -434,7 +434,7 @@ func validateUserAddress(c *gin.Context) {
return
}
c.JSON(http.StatusOK, true)
c.JSON(http.StatusNoContent, true)
}
type UploadedAccountRecovery struct {
@ -475,7 +475,7 @@ func recoverUserAccount(c *gin.Context) {
}
log.Printf("%s: User recovered: %s", c.ClientIP(), user.Email)
c.JSON(http.StatusOK, true)
c.JSON(http.StatusNoContent, true)
}
func getSession(c *gin.Context) {