mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-12 12:27:09 +02:00
Introduces context.Context in API controllers
This commit is contained in:
parent
dc98b187d9
commit
2861a97a89
5 changed files with 47 additions and 14 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
|
@ -12,7 +13,10 @@ import (
|
|||
"github.com/cloudsonic/sonic-server/utils"
|
||||
)
|
||||
|
||||
type BaseAPIController struct{ beego.Controller }
|
||||
type BaseAPIController struct {
|
||||
beego.Controller
|
||||
context context.Context
|
||||
}
|
||||
|
||||
func (c *BaseAPIController) NewEmpty() responses.Subsonic {
|
||||
return responses.Subsonic{Status: "ok", Version: beego.AppConfig.String("apiVersion")}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue