Implementation endpoint for APIv4: GET /teams/name/{name} (#5473)

* APIv4: GET /teams/name/{name}

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>

* reorganized test with SystemAdminClient

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
Этот коммит содержится в:
Saturnino Abril
2017-02-21 01:27:57 +09:00
коммит произвёл enahum
родитель 22118fafc8
Коммит 623560481b
4 изменённых файлов: 63 добавлений и 0 удалений

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

@@ -304,6 +304,7 @@ func GetTeam(teamId string) (*model.Team, *model.AppError) {
func GetTeamByName(name string) (*model.Team, *model.AppError) {
if result := <-Srv.Store.Team().GetByName(name); result.Err != nil {
result.Err.StatusCode = http.StatusNotFound
return nil, result.Err
} else {
return result.Data.(*model.Team), nil