update frontend ui, i18n, filters, and deps
This commit is contained in:
@@ -27,6 +27,9 @@ type categorieRequest struct {
|
||||
func (h *Handler) ListCategories(c *gin.Context) {
|
||||
limit, offset, page := parsePagination(c.Query("page"), c.Query("limit"))
|
||||
query := h.client.Categorie.Query()
|
||||
if nom := c.Query("nom"); nom != "" {
|
||||
query = query.Where(categorie.NomContainsFold(nom))
|
||||
}
|
||||
total, err := query.Count(c.Request.Context())
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"erreur": "impossible de compter les categories"})
|
||||
|
||||
Reference in New Issue
Block a user