MM-40818: Pass filestore to channels (#19677)

We move away from referencing server struct
but pass the filestore service to Channels
explicitly.

https://mattermost.atlassian.net/browse/MM-40818

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2022-03-10 19:49:05 +05:30
коммит произвёл GitHub
родитель c8eafebecf
Коммит 7664c9d709
5 изменённых файлов: 32 добавлений и 10 удалений

Просмотреть файл

@@ -89,8 +89,9 @@ var SentryDSN = "placeholder_sentry_dsn"
type ServiceKey string
const (
ConfigKey ServiceKey = "config"
LicenseKey ServiceKey = "license"
ConfigKey ServiceKey = "config"
LicenseKey ServiceKey = "license"
FilestoreKey ServiceKey = "filestore"
)
type Server struct {
@@ -362,8 +363,9 @@ func NewServer(options ...Option) (*Server, error) {
}
serviceMap := map[ServiceKey]interface{}{
ConfigKey: s.configStore,
LicenseKey: s.licenseWrapper,
ConfigKey: s.configStore,
LicenseKey: s.licenseWrapper,
FilestoreKey: s.filestore,
}
// Step 8: Initialize products.
// Depends on s.httpService.