MM-43145: channels loader (#19957)
Add channels dataloader https://mattermost.atlassian.net/browse/MM-43145 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4b354685e9
Коммит
d1de4857aa
@@ -294,3 +294,12 @@ func getRolesLoader(ctx context.Context) (*dataloader.Loader, error) {
|
||||
}
|
||||
return l, nil
|
||||
}
|
||||
|
||||
// getChannelsLoader returns the channels loader out of the context.
|
||||
func getChannelsLoader(ctx context.Context) (*dataloader.Loader, error) {
|
||||
l, ok := ctx.Value(channelsLoaderCtx).(*dataloader.Loader)
|
||||
if !ok {
|
||||
return nil, errors.New("no dataloader.Loader found in context")
|
||||
}
|
||||
return l, nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user