[MM-55606]: add the request context to all public methods in server/channels/app/brand.go (#25542)
Co-authored-by: Sudheer Tripathi <sudheer@clearglass.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
18c6d37551
Коммит
6e3f0ab928
@@ -20,7 +20,7 @@ func (api *API) InitBrand() {
|
||||
func getBrandImage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
// No permission check required
|
||||
|
||||
img, err := c.App.GetBrandImage()
|
||||
img, err := c.App.GetBrandImage(c.AppContext)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
w.Write(nil)
|
||||
@@ -65,7 +65,7 @@ func uploadBrandImage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := c.App.SaveBrandImage(imageArray[0]); err != nil {
|
||||
if err := c.App.SaveBrandImage(c.AppContext, imageArray[0]); err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
@@ -86,7 +86,7 @@ func deleteBrandImage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := c.App.DeleteBrandImage(); err != nil {
|
||||
if err := c.App.DeleteBrandImage(c.AppContext); err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user