From dafc3b5b92865b97be48456e02ad235f4c79cf4e Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Tue, 20 Apr 2021 18:14:23 +0200 Subject: linting + organizing --- internal/apimodule/fileserver/fileserver.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/apimodule/fileserver/fileserver.go') 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{}, -- cgit v1.2.3