diff options
author | 2021-04-20 18:14:23 +0200 | |
---|---|---|
committer | 2021-04-20 18:14:23 +0200 | |
commit | dafc3b5b92865b97be48456e02ad235f4c79cf4e (patch) | |
tree | 0f97edf4377f406df321054d26e731ff5dcc6667 /internal/apimodule/fileserver/fileserver.go | |
parent | Api/v1/statuses (#11) (diff) | |
download | gotosocial-dafc3b5b92865b97be48456e02ad235f4c79cf4e.tar.xz |
linting + organizing
Diffstat (limited to 'internal/apimodule/fileserver/fileserver.go')
-rw-r--r-- | internal/apimodule/fileserver/fileserver.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/apimodule/fileserver/fileserver.go b/internal/apimodule/fileserver/fileserver.go index 25f3be864..7651c8cc1 100644 --- a/internal/apimodule/fileserver/fileserver.go +++ b/internal/apimodule/fileserver/fileserver.go @@ -32,12 +32,14 @@ import ( ) const ( + // AccountIDKey is the url key for account id (an account uuid) AccountIDKey = "account_id" + // MediaTypeKey is the url key for media type (usually something like attachment or header etc) MediaTypeKey = "media_type" + // MediaSizeKey is the url key for the desired media size--original/small/static MediaSizeKey = "media_size" + // FileNameKey is the actual filename being sought. Will usually be a UUID then something like .jpeg FileNameKey = "file_name" - - FilesPath = "files" ) // FileServer implements the RESTAPIModule interface. @@ -67,6 +69,7 @@ func (m *FileServer) Route(s router.Router) error { return nil } +// CreateTables populates necessary tables in the given DB func (m *FileServer) CreateTables(db db.DB) error { models := []interface{}{ >smodel.MediaAttachment{}, |