Introduces context.Context in API controllers

This commit is contained in:
Deluan
2017-04-03 00:16:21 -04:00
parent dc98b187d9
commit 2861a97a89
5 changed files with 47 additions and 14 deletions

View File

@@ -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")}