MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
66fc096768
Коммит
17523fa5d9
@@ -75,7 +75,7 @@ func manualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
|
||||
Type: model.TEAM_OPEN,
|
||||
}
|
||||
|
||||
createdTeam, err := c.App.Srv.Store.Team().Save(team)
|
||||
createdTeam, err := c.App.Srv().Store.Team().Save(team)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
@@ -101,8 +101,8 @@ func manualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
c.App.Srv.Store.User().VerifyEmail(user.Id, user.Email)
|
||||
c.App.Srv.Store.Team().SaveMember(&model.TeamMember{TeamId: teamID, UserId: user.Id}, *c.App.Config().TeamSettings.MaxUsersPerTeam)
|
||||
c.App.Srv().Store.User().VerifyEmail(user.Id, user.Email)
|
||||
c.App.Srv().Store.Team().SaveMember(&model.TeamMember{TeamId: teamID, UserId: user.Id}, *c.App.Config().TeamSettings.MaxUsersPerTeam)
|
||||
|
||||
userID = user.Id
|
||||
|
||||
@@ -151,9 +151,9 @@ func manualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func getChannelID(a *app.App, channelname string, teamid string, userid string) (string, bool) {
|
||||
func getChannelID(a app.AppIface, channelname string, teamid string, userid string) (string, bool) {
|
||||
// Grab all the channels
|
||||
channels, err := a.Srv.Store.Channel().GetChannels(teamid, userid, false)
|
||||
channels, err := a.Srv().Store.Channel().GetChannels(teamid, userid, false)
|
||||
if err != nil {
|
||||
mlog.Debug("Unable to get channels")
|
||||
return "", false
|
||||
|
||||
Ссылка в новой задаче
Block a user