25 lines
527 B
Go
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
|
|
}
|