in api.go [220:236]
func (h apiHandlers) getOrderDetails(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
c.AbortWithError(http.StatusInternalServerError, err)
return
}
customer, err := getOrder(c.Request.Context(), h.db, id)
if err != nil {
c.AbortWithError(http.StatusInternalServerError, err)
return
}
if customer == nil {
c.AbortWithStatus(http.StatusNotFound)
return
}
c.JSON(http.StatusOK, customer)
}