Complete file tree and packages managment rework

This commit is contained in:
Florian Sylvain
2022-12-27 21:00:19 +01:00
parent 39afc0c066
commit 451fd8452b
11 changed files with 153 additions and 161 deletions
+19
View File
@@ -0,0 +1,19 @@
package api
import (
"net/http"
"github.com/gin-gonic/gin"
)
func SendBadRequest(c *gin.Context, message string) {
c.JSON(http.StatusBadRequest, gin.H{"message": message})
}
func SendOk(c *gin.Context, message string) {
c.JSON(http.StatusOK, gin.H{"message": message})
}
func SendForbidden(c *gin.Context, message string) {
c.JSON(http.StatusForbidden, gin.H{"message": message})
}