20 lines
373 B
Go
20 lines
373 B
Go
package application
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func (a *Application) GetClaimsHandler(c *gin.Context) {
|
|
system := c.DefaultQuery("system", "upc")
|
|
barcode := c.Query("barcode")
|
|
|
|
productClaims, err := a.GetClaims(system, barcode)
|
|
if err != nil {
|
|
c.JSON(http.StatusInternalServerError, nil)
|
|
return
|
|
}
|
|
c.JSON(http.StatusOK, productClaims)
|
|
}
|