mirror of
https://github.com/pushbits/server.git
synced 2025-05-27 15:56:32 +02:00
Initialize repository
This commit is contained in:
commit
1d758fcfd0
28 changed files with 1107 additions and 0 deletions
13
api/util.go
Normal file
13
api/util.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func successOrAbort(ctx *gin.Context, code int, err error) bool {
|
||||
if err != nil {
|
||||
ctx.AbortWithError(code, err)
|
||||
}
|
||||
|
||||
return err == nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue