Revert " PLT-7 adding loc for db calls"
Этот коммит содержится в:
@@ -4,18 +4,16 @@
|
||||
package manualtesting
|
||||
|
||||
import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/platform/api"
|
||||
"github.com/mattermost/platform/model"
|
||||
"github.com/mattermost/platform/utils"
|
||||
"hash/fnv"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/platform/api"
|
||||
"github.com/mattermost/platform/model"
|
||||
"github.com/mattermost/platform/utils"
|
||||
goi18n "github.com/nicksnyder/go-i18n/i18n"
|
||||
)
|
||||
|
||||
type TestEnvironment struct {
|
||||
@@ -72,7 +70,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
Type: model.TEAM_OPEN,
|
||||
}
|
||||
|
||||
if result := <-api.Srv.Store.Team().Save(c.T, team); result.Err != nil {
|
||||
if result := <-api.Srv.Store.Team().Save(team); result.Err != nil {
|
||||
c.Err = result.Err
|
||||
return
|
||||
} else {
|
||||
@@ -100,7 +98,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
api.Srv.Store.User().VerifyEmail(c.T, result.Data.(*model.User).Id)
|
||||
api.Srv.Store.User().VerifyEmail(result.Data.(*model.User).Id)
|
||||
newuser := result.Data.(*model.User)
|
||||
userID = newuser.Id
|
||||
|
||||
@@ -151,9 +149,9 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func getChannelID(T goi18n.TranslateFunc, channelname string, teamid string, userid string) (id string, err bool) {
|
||||
func getChannelID(channelname string, teamid string, userid string) (id string, err bool) {
|
||||
// Grab all the channels
|
||||
result := <-api.Srv.Store.Channel().GetChannels(T, teamid, userid)
|
||||
result := <-api.Srv.Store.Channel().GetChannels(teamid, userid)
|
||||
if result.Err != nil {
|
||||
l4g.Debug("Unable to get channels")
|
||||
return "", false
|
||||
|
||||
Ссылка в новой задаче
Block a user