fix(image): json type of struct property (#1469)

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/api#1469
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
Dominik Pschenitschni 2023-04-06 09:53:09 +00:00 committed by konrad
parent f76bb2b4a9
commit cca430810d
6 changed files with 8 additions and 8 deletions

View File

@ -1692,12 +1692,12 @@ func (t *Task) Delete(s *xorm.Session, a web.Auth) (err error) {
// @tags task
// @Accept json
// @Produce json
// @Param ID path int true "The task ID"
// @Param id path int true "The task ID"
// @Security JWTKeyAuth
// @Success 200 {object} models.Task "The task"
// @Failure 404 {object} models.Message "Task not found"
// @Failure 500 {object} models.Message "Internal error"
// @Router /tasks/{ID} [get]
// @Router /tasks/{id} [get]
func (t *Task) ReadOne(s *xorm.Session, a web.Auth) (err error) {
*t, err = GetTaskByIDSimple(s, t.ID)

View File

@ -267,7 +267,7 @@ func checkProjectBackgroundRights(s *xorm.Session, c echo.Context) (project *mod
// @Produce octet-stream
// @Param id path int true "Project ID"
// @Security JWTKeyAuth
// @Success 200 {} string "The project background file."
// @Success 200 {file} blob "The project background file."
// @Failure 403 {object} models.Message "No access to this project."
// @Failure 404 {object} models.Message "The project does not exist."
// @Failure 500 {object} models.Message "Internal error"

View File

@ -49,7 +49,7 @@ func unsplashImage(url string, c echo.Context) error {
// @Produce octet-stream
// @Param image path int true "Unsplash Image ID"
// @Security JWTKeyAuth
// @Success 200 {} string "The image"
// @Success 200 {file} blob "The image"
// @Failure 404 {object} models.Message "The image does not exist."
// @Failure 500 {object} models.Message "Internal error"
// @Router /backgrounds/unsplash/image/{image} [get]
@ -69,7 +69,7 @@ func ProxyUnsplashImage(c echo.Context) error {
// @Produce octet-stream
// @Param image path int true "Unsplash Image ID"
// @Security JWTKeyAuth
// @Success 200 {} string "The thumbnail"
// @Success 200 {file} blob "The thumbnail"
// @Failure 404 {object} models.Message "The image does not exist."
// @Failure 500 {object} models.Message "Internal error"
// @Router /backgrounds/unsplash/image/{image}/thumb [get]

View File

@ -51,7 +51,7 @@ import (
// @Produce octet-stream
// @Param username path string true "The username of the user who's avatar you want to get"
// @Param size query int false "The size of the avatar you want to get. If bigger than the max configured size this will be adjusted to the maximum size."
// @Success 200 {} blob "The avatar"
// @Success 200 {file} blob "The avatar"
// @Failure 404 {object} models.Message "The user does not exist."
// @Failure 500 {object} models.Message "Internal error"
// @Router /{username}/avatar [get]

View File

@ -116,7 +116,7 @@ func UploadTaskAttachment(c echo.Context) error {
// @Param id path int true "Task ID"
// @Param attachmentID path int true "Attachment ID"
// @Security JWTKeyAuth
// @Success 200 {} string "The attachment file."
// @Success 200 {file} blob "The attachment file."
// @Failure 403 {object} models.Message "No access to this task."
// @Failure 404 {object} models.Message "The task does not exist."
// @Failure 500 {object} models.Message "Internal error"

View File

@ -181,7 +181,7 @@ func UserTOTPDisable(c echo.Context) error {
// @Accept json
// @Produce json
// @Security JWTKeyAuth
// @Success 200 {} string "The qr code as jpeg image"
// @Success 200 {file} blob "The qr code as jpeg image"
// @Failure 500 {object} models.Message "Internal server error."
// @Router /user/settings/totp/qrcode [get]
func UserTOTPQrCode(c echo.Context) error {