package features_shopping import ( "github.com/gofiber/fiber/v2" "MY/webapp/data" _ "github.com/mattn/go-sqlite3" sq "github.com/Masterminds/squirrel" "fmt" ) func GetApiProducts(c *fiber.Ctx) error { sql, args, err := sq.Select("*").From("Product").ToSql() fmt.Println("SQL:", sql, args, err) return data.SelectJson[data.Product](c, err, sql, args...) } func GetApiCart(c *fiber.Ctx) error { return c.JSON(fiber.Map{}) } func SetupApi(app *fiber.App) { app.Get("/api/shopping/products", GetApiProducts) app.Get("/api/shopping/cart", GetApiCart) }