mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-15186: Migrate "WebHook.GetOutgoingByTeam" to Sync by defa (#10707)
This commit is contained in:
@@ -108,7 +108,12 @@ func listWebhookCmdF(command *cobra.Command, args []string) error {
|
||||
incomingResult <- store.StoreResult{Data: incomingHooks, Err: err}
|
||||
close(incomingResult)
|
||||
}()
|
||||
outgoingResult := app.Srv.Store.Webhook().GetOutgoingByTeam(team.Id, 0, 100000000)
|
||||
outgoingResult := make(chan store.StoreResult, 1)
|
||||
go func() {
|
||||
outgoingHooks, err := app.Srv.Store.Webhook().GetOutgoingByTeam(team.Id, 0, 100000000)
|
||||
outgoingResult <- store.StoreResult{Data: outgoingHooks, Err: err}
|
||||
close(outgoingResult)
|
||||
}()
|
||||
|
||||
if result := <-incomingResult; result.Err == nil {
|
||||
CommandPrettyPrintln(fmt.Sprintf("Incoming webhooks for %s (%s):", team.DisplayName, team.Name))
|
||||
|
||||
Reference in New Issue
Block a user