summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-11 08:04:01 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-11 08:04:01 -0400
commit720222f3a65fbe0de53aec84730af5ba37794c42 (patch)
tree53f30ffe5a61c0c2e778a8836a7a9a055975d819 /api
parent95cc21fb716c1810041c2b438641125ec71dbf5c (diff)
downloadchat-720222f3a65fbe0de53aec84730af5ba37794c42.tar.gz
chat-720222f3a65fbe0de53aec84730af5ba37794c42.tar.bz2
chat-720222f3a65fbe0de53aec84730af5ba37794c42.zip
Removing export route (#2955)
Diffstat (limited to 'api')
-rw-r--r--api/team.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/api/team.go b/api/team.go
index 605aa590b..f9b718e06 100644
--- a/api/team.go
+++ b/api/team.go
@@ -41,7 +41,6 @@ func InitTeam() {
// These should be moved to the global admain console
BaseRoutes.NeedTeam.Handle("/import_team", ApiUserRequired(importTeam)).Methods("POST")
- BaseRoutes.NeedTeam.Handle("/export_team", ApiUserRequired(exportTeam)).Methods("GET")
BaseRoutes.Teams.Handle("/add_user_to_team_from_invite", ApiUserRequired(addUserToTeamFromInvite)).Methods("POST")
}
@@ -753,25 +752,6 @@ func importTeam(c *Context, w http.ResponseWriter, r *http.Request) {
http.ServeContent(w, r, "MattermostImportLog.txt", time.Now(), bytes.NewReader(log.Bytes()))
}
-func exportTeam(c *Context, w http.ResponseWriter, r *http.Request) {
- if !c.HasPermissionsToTeam(c.TeamId, "export") || !c.IsTeamAdmin() {
- c.Err = model.NewLocAppError("exportTeam", "api.team.export_team.admin.app_error", nil, "userId="+c.Session.UserId)
- c.Err.StatusCode = http.StatusForbidden
- return
- }
-
- options := ExportOptionsFromJson(r.Body)
-
- if link, err := ExportToFile(options); err != nil {
- c.Err = err
- return
- } else {
- result := map[string]string{}
- result["link"] = link
- w.Write([]byte(model.MapToJson(result)))
- }
-}
-
func getInviteInfo(c *Context, w http.ResponseWriter, r *http.Request) {
m := model.MapFromJson(r.Body)
inviteId := m["invite_id"]