diff options
author | 2022-09-28 18:30:40 +0100 | |
---|---|---|
committer | 2022-09-28 18:30:40 +0100 | |
commit | a156188b3eb5cb3da44aa1b7452265f5fa38a607 (patch) | |
tree | 7097fa48d56fbabc7c2c8750b1f3bc9321d71c0f /internal/api/client/media/mediacreate.go | |
parent | [bugfix] Fix emphasis being added to emoji shortcodes with markdown parsing (... (diff) | |
download | gotosocial-a156188b3eb5cb3da44aa1b7452265f5fa38a607.tar.xz |
[chore] update dependencies, bump to Go 1.19.1 (#826)
* update dependencies, bump Go version to 1.19
* bump test image Go version
* update golangci-lint
* update gotosocial-drone-build
* sign
* linting, go fmt
* update swagger docs
* update swagger docs
* whitespace
* update contributing.md
* fuckin whoopsie doopsie
* linterino, linteroni
* fix followrequest test not starting processor
* fix other api/client tests not starting processor
* fix remaining tests where processor not started
* bump go-runners version
* don't check last-webfingered-at, processor may have updated this
* update swagger command
* update bun to latest version
* fix embed to work the same as before with new bun
Signed-off-by: kim <grufwub@gmail.com>
Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/api/client/media/mediacreate.go')
-rw-r--r-- | internal/api/client/media/mediacreate.go | 101 |
1 files changed, 53 insertions, 48 deletions
diff --git a/internal/api/client/media/mediacreate.go b/internal/api/client/media/mediacreate.go index 5a040b26c..62f4a0d4e 100644 --- a/internal/api/client/media/mediacreate.go +++ b/internal/api/client/media/mediacreate.go @@ -35,59 +35,64 @@ import ( // // Upload a new media attachment. // -// --- -// tags: -// - media +// --- +// tags: +// - media // -// consumes: -// - multipart/form-data +// consumes: +// - multipart/form-data // -// produces: -// - application/json +// produces: +// - application/json // -// parameters: -// - name: api version -// type: string -// in: path -// description: Version of the API to use. Must be one of v1 or v2. -// 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 -// - 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 -// - name: file -// in: formData -// description: The media attachment to upload. -// type: file -// required: true +// parameters: +// - +// name: api_version +// type: string +// in: path +// description: Version of the API to use. Must be either `v1` or `v2`. +// 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 +// - +// 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 +// default: "0,0" +// - +// name: file +// in: formData +// description: The media attachment to upload. +// type: file +// required: true // -// security: -// - OAuth2 Bearer: -// - write:media +// security: +// - OAuth2 Bearer: +// - write:media // -// responses: -// '200': -// description: The newly-created media attachment. -// schema: -// "$ref": "#/definitions/attachment" -// '400': -// description: bad request -// '401': -// description: unauthorized -// '422': -// description: unprocessable -// '500': -// description: internal server error +// responses: +// '200': +// description: The newly-created media attachment. +// schema: +// "$ref": "#/definitions/attachment" +// '400': +// description: bad request +// '401': +// description: unauthorized +// '422': +// description: unprocessable +// '500': +// description: internal server error func (m *Module) MediaCreatePOSTHandler(c *gin.Context) { authed, err := oauth.Authed(c, true, true, true, true) if err != nil { |