fix: add role limit
This commit is contained in:
@@ -12,6 +12,8 @@ const (
|
||||
BAD_REQUEST = "Bad Request"
|
||||
DATA_NOT_FOUND = "Data not Found"
|
||||
STATUS_DATA_NOT_FOUND = 210
|
||||
FORBIDDENT = "FORBIDDENT"
|
||||
PAGE_NOT_FOUND = "404 page not found"
|
||||
)
|
||||
|
||||
func RequestError(c *gin.Context, code int, data interface{}) {
|
||||
@@ -31,3 +33,10 @@ func ServerErr(c *gin.Context, msg interface{}) {
|
||||
func DataNotFound(c *gin.Context, data interface{}) {
|
||||
utils.Success(c, http.StatusOK, STATUS_DATA_NOT_FOUND, DATA_NOT_FOUND, data)
|
||||
}
|
||||
func Forbidden(c *gin.Context) {
|
||||
utils.Err(c, http.StatusForbidden, http.StatusForbidden, FORBIDDENT)
|
||||
}
|
||||
|
||||
func UrlNotFound(c *gin.Context) {
|
||||
c.String(http.StatusNotFound, PAGE_NOT_FOUND)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user