mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 06:12:25 -05:00
[feature] add configuration to /api/v1/instance response (#670)
* add configuration object to api instance model * regenerate swagger docs * add func to return all supported mimes for media * add instance configuration to api serialization * fix json tags * update instance endpoint tests * fix typeutils tests * final regen of swagger docs * omitempty instance configuration
This commit is contained in:
parent
3e4e57d554
commit
68736efd20
5 changed files with 252 additions and 5 deletions
|
|
@ -26,6 +26,16 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// AllSupportedMIMETypes just returns all media
|
||||
// MIME types supported by this instance.
|
||||
func AllSupportedMIMETypes() []string {
|
||||
return []string{
|
||||
mimeImageJpeg,
|
||||
mimeImageGif,
|
||||
mimeImagePng,
|
||||
}
|
||||
}
|
||||
|
||||
// parseContentType parses the MIME content type from a file, returning it as a string in the form (eg., "image/jpeg").
|
||||
// Returns an error if the content type is not something we can process.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue