messy
This commit is contained in:
parent
51a34008f1
commit
2dd8cc3d2b
9 changed files with 92 additions and 73 deletions
24
internal/handlers/claims_handler.go
Normal file
24
internal/handlers/claims_handler.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/labstack/gommon/log"
|
||||
|
||||
"vegan-barcode/internal/services"
|
||||
)
|
||||
|
||||
func runTest(c *gin.Context) {
|
||||
queryParam := c.Param("id")
|
||||
log.Debug("Test was successful.")
|
||||
c.JSON(http.StatusOK, gin.H{"message": "Hello World!", "query_param": queryParam})
|
||||
}
|
||||
|
||||
func GetClaimsHandler(c *gin.Context) {
|
||||
system := c.DefaultQuery("system", "upc")
|
||||
barcode := c.Query("barcode")
|
||||
|
||||
claims := services.GetClaims(system, barcode)
|
||||
// TODO: 404 when claims are not found
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue