This commit is contained in:
aditya.siregar
2025-07-18 20:10:29 +07:00
parent 1bceae010b
commit 4f5950543e
511 changed files with 24132 additions and 34137 deletions
+17
View File
@@ -0,0 +1,17 @@
package middleware
import (
"github.com/gin-gonic/gin"
)
const (
contentTypeHeader = "Content-Type"
jsonContentType = "application/json"
)
func JsonAPI() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set(contentTypeHeader, jsonContentType)
c.Next()
}
}