# Functions
No description provided by the author
No description provided by the author
No description provided by the author
function to get a specific user profile.
No description provided by the author
function for admin to update thr user profiel.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
func SearchMenuItemsByTags(c *fiber.Ctx) error {
tag := c.Query("tag") // this retrieves the query parameter named "tag" from the HTTP request, if fails to retrieve, an empty string will be returned
if tag == "" { //checks if the string is empty
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "Tag query parameter is required"})
}
var items []models.MenuItem
result := database.Db.Where("LOWER(tags) LIKE LOWER(?)", "%"+tag+"%").Find(&items)
if result.Error != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{"error": result.Error.Error()})
}
return c.Status(fiber.StatusOK).JSON(items) //if no error then sends a json response
}*/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author