Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
func (Controller) Delete ¶
func (controller Controller) Delete(c echo.Context) error
Delete removes an image from the user's favorites. It expects the image data in the request body. Returns a JSON response indicating the state of the operation. @Summary Delete an image from favorites @Description Removes an image from the user's favorites. @Tags Favorites @Accept json @Produce json @Param image body serializers.Image true "Image data" @Param user_id body serializers.User false "User ID" @Security ApiKeyAuth @Success 200 {object} serializers.FavState "DELETED" @Failure default {object} serializers.JSONError @Router /fav/delete [delete]
func (Controller) Insert ¶
func (controller Controller) Insert(c echo.Context) error
Insert inserts an image to the user's favorites. It expects the image data in the request body. Returns a JSON response indicating the state of the operation. @Summary Insert an image to favorites @Description Inserts an image to the user's favorites. @Tags Favorites @Accept json @Produce json @Param image body serializers.Image true "Image data" @Param user_id body serializers.User false "User ID" @Security ApiKeyAuth @Success 200 {object} serializers.FavState "INSERTED" @Failure default {object} serializers.JSONError @Router /fav/insert [post]
func (Controller) Toggle ¶
func (controller Controller) Toggle(c echo.Context) error
Toggle toggles an image in the user's favorites. It expects the image data in the request body. Returns a JSON response indicating the state of the operation. @Summary Toggle an image in favorites @Description Toggles an image in the user's favorites. @Tags Favorites @Accept json @Produce json @Param image body serializers.Image true "Image data" @Param user_id body serializers.User false "User ID" @Security ApiKeyAuth @Success 200 {object} serializers.FavState @Failure default {object} serializers.JSONError @Router /fav/toggle [post]