create categories and subcategories in database and categories logic

This commit is contained in:
wt committed 2025-08-09 14:12:25 +07:00
1 parent d3d644d68f
commit 2c06975a43
4 files changed
+103 -2

No files matched your search

+2 -2
View File
@@ -1,13 +1,13 @@
package api
import (
"backend/internal/category"
"backend/database"
"github.com/gofiber/fiber/v2"
)
func GetAllCategories(c *fiber.Ctx) error {
categories, err := category.GetAllCategories()
categories, err := database.GetAllCategories()
if err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
"error": err.Error(),