Fixed nil logger pointer in rest endpoints

Closes #153
This commit is contained in:
2024-05-24 13:59:03 +02:00
parent e0e923822c
commit f2389a6e6a
5 changed files with 31 additions and 16 deletions

View File

@@ -178,7 +178,12 @@ func newServer(c serverConfig) *http.Server {
r.Route("/rpc", ytdlpRPC.ApplyRouter())
// REST API handlers
r.Route("/api/v1", rest.ApplyRouter(c.db, c.mdb, c.mq))
r.Route("/api/v1", rest.ApplyRouter(&rest.ContainerArgs{
DB: c.db,
MDB: c.mdb,
MQ: c.mq,
Logger: c.logger,
}))
// Logging
r.Route("/log", logging.ApplyRouter())