Move ImageProxy inside Channels (#18656)
* Move ImageProxy inside Channels ```release-note NONE ``` * Move back httpService ```release-note NONE ``` Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4b85f9ee6a
Коммит
850fef1ad1
@@ -3,13 +3,15 @@
|
||||
|
||||
package app
|
||||
|
||||
import "github.com/mattermost/mattermost-server/v6/services/httpservice"
|
||||
import (
|
||||
"github.com/mattermost/mattermost-server/v6/services/imageproxy"
|
||||
)
|
||||
|
||||
// Channels contains all channels related state.
|
||||
type Channels struct {
|
||||
srv *Server
|
||||
|
||||
httpService httpservice.HTTPService
|
||||
imageProxy *imageproxy.ImageProxy
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -20,8 +22,8 @@ func init() {
|
||||
|
||||
func NewChannels(s *Server) (*Channels, error) {
|
||||
return &Channels{
|
||||
srv: s,
|
||||
httpService: httpservice.MakeHTTPService(s),
|
||||
srv: s,
|
||||
imageProxy: imageproxy.MakeImageProxy(s, s.httpService, s.Log),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -32,7 +34,3 @@ func (c *Channels) Start() error {
|
||||
func (c *Channels) Stop() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Channels) HTTPService() httpservice.HTTPService {
|
||||
return c.httpService
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user