func CategoriesHandler(context *gin.Context, database *db.Context) { result, err := database.Categories() if err != nil { context.AbortWithError(http.StatusInternalServerError, err) } context.JSON(http.StatusOK, result) }