vegan-barcode/internal/handlers/claims_handler.go
2025-04-21 16:56:58 -05:00

25 lines
527 B
Go

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
}