mirror of
https://github.com/gotify/server.git
synced 2026-05-06 13:31:22 +08:00
11 lines
197 B
Go
11 lines
197 B
Go
package api
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
func successOrAbort(ctx *gin.Context, code int, err error) (success bool) {
|
|
if err != nil {
|
|
ctx.AbortWithError(code, err)
|
|
}
|
|
return err == nil
|
|
}
|