fav_management

package
v0.0.0-...-4711403 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Globals utils.Globals
}

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL