Documentation
¶
Overview ¶
Package preferences reads and changes the preferences of the account: GET and PATCH /api/preferences.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
func Read(db bun.IDB) http.HandlerFunc
Read gives the preferences, the defaults where none was saved. @Summary Read the preferences @Tags preferences @Produce json @Success 200 {object} domain.Preferences @Failure 401 {object} respond.Failure @Router /api/preferences [get]
func Update ¶
func Update(db bun.IDB) http.HandlerFunc
Update sets the preferences given, the others keep their value. @Summary Change the preferences @Tags preferences @Accept json @Produce json @Param body body domain.PreferenceChanges true "body" @Success 200 {object} domain.Preferences @Failure 400 {object} respond.Failure @Failure 401 {object} respond.Failure @Router /api/preferences [patch]
Types ¶
This section is empty.