fix: initialize mimetypes for tests
This commit is contained in:
parent
28bad95e66
commit
e5e35516d7
2 changed files with 2 additions and 3 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
package server
|
package consts
|
||||||
|
|
||||||
import "mime"
|
import "mime"
|
||||||
|
|
||||||
func initMimeTypes() {
|
func init() {
|
||||||
mt := map[string]string{
|
mt := map[string]string{
|
||||||
".mp3": "audio/mpeg",
|
".mp3": "audio/mpeg",
|
||||||
".ogg": "audio/ogg",
|
".ogg": "audio/ogg",
|
||||||
|
|
@ -23,7 +23,6 @@ type Server struct {
|
||||||
|
|
||||||
func New(scanner *scanner.Scanner, ds model.DataStore) *Server {
|
func New(scanner *scanner.Scanner, ds model.DataStore) *Server {
|
||||||
a := &Server{Scanner: scanner, ds: ds}
|
a := &Server{Scanner: scanner, ds: ds}
|
||||||
initMimeTypes()
|
|
||||||
initialSetup(ds)
|
initialSetup(ds)
|
||||||
a.initRoutes()
|
a.initRoutes()
|
||||||
a.initScanner()
|
a.initScanner()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue