diff options
Diffstat (limited to 'internal/api/client/media/mediaupdate.go')
-rw-r--r-- | internal/api/client/media/mediaupdate.go | 102 |
1 files changed, 53 insertions, 49 deletions
diff --git a/internal/api/client/media/mediaupdate.go b/internal/api/client/media/mediaupdate.go index 32aef9cff..fb0e67ddc 100644 --- a/internal/api/client/media/mediaupdate.go +++ b/internal/api/client/media/mediaupdate.go @@ -40,60 +40,64 @@ import ( // The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. // The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. // -// --- -// tags: -// - media +// --- +// tags: +// - media // -// consumes: -// - application/json -// - application/xml -// - application/x-www-form-urlencoded +// consumes: +// - application/json +// - application/xml +// - application/x-www-form-urlencoded // -// produces: -// - application/json +// produces: +// - application/json // -// parameters: -// - name: id -// description: id of the attachment to update -// type: string -// in: path -// required: true -// - name: description -// in: formData -// description: |- -// Image or media description to use as alt-text on the attachment. -// This is very useful for users of screenreaders. -// May or may not be required, depending on your instance settings. -// type: string -// allowEmptyValue: true -// - name: focus -// in: formData -// description: |- -// Focus of the media file. -// If present, it should be in the form of two comma-separated floats between -1 and 1. -// For example: `-0.5,0.25`. -// type: string -// allowEmptyValue: true +// parameters: +// - +// name: id +// description: id of the attachment to update +// type: string +// in: path +// required: true +// - +// name: description +// in: formData +// description: >- +// Image or media description to use as alt-text on the attachment. +// This is very useful for users of screenreaders! +// May or may not be required, depending on your instance settings. +// type: string +// allowEmptyValue: true +// - +// name: focus +// in: formData +// description: >- +// Focus of the media file. +// If present, it should be in the form of two comma-separated floats between -1 and 1. +// For example: `-0.5,0.25`. +// type: string +// allowEmptyValue: true +// default: "0,0" // -// security: -// - OAuth2 Bearer: -// - write:media +// security: +// - OAuth2 Bearer: +// - write:media // -// responses: -// '200': -// description: The newly-updated media attachment. -// schema: -// "$ref": "#/definitions/attachment" -// '400': -// description: bad request -// '401': -// description: unauthorized -// '404': -// description: not found -// '406': -// description: not acceptable -// '500': -// description: internal server error +// responses: +// '200': +// description: The newly-updated media attachment. +// schema: +// "$ref": "#/definitions/attachment" +// '400': +// description: bad request +// '401': +// description: unauthorized +// '404': +// description: not found +// '406': +// description: not acceptable +// '500': +// description: internal server error func (m *Module) MediaPUTHandler(c *gin.Context) { authed, err := oauth.Authed(c, true, true, true, true) if err != nil { |