Introduces context.Context in API controllers

This commit is contained in:
Deluan committed 2017-04-03 00:16:21 -04:00
1 parent dc98b187d9
commit 2861a97a89
5 files changed
+47 -14

No files matched your search

+5 -1
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")}