summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-01-04 14:11:48 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-04 14:11:47 -0500
commit635628cf30460a75d3a870394ad66db91f3bea9f (patch)
tree17d40987fab0876c6dc95acec7f82b4f3eb36c01 /model
parentb3f2ab654e95325b556e0c93b41ea6e15e45fffe (diff)
downloadchat-635628cf30460a75d3a870394ad66db91f3bea9f.tar.gz
chat-635628cf30460a75d3a870394ad66db91f3bea9f.tar.bz2
chat-635628cf30460a75d3a870394ad66db91f3bea9f.zip
Removing old signup team API (#4950)
Diffstat (limited to 'model')
-rw-r--r--model/client.go16
-rw-r--r--model/team_signup.go40
-rw-r--r--model/team_signup_test.go20
3 files changed, 0 insertions, 76 deletions
diff --git a/model/client.go b/model/client.go
index 0c8bdcc5b..540bc747f 100644
--- a/model/client.go
+++ b/model/client.go
@@ -299,22 +299,6 @@ func (c *Client) GetPing() (map[string]string, *AppError) {
// Team Routes Section
-// SignupTeam sends an email with a team sign-up link to the provided address if email
-// verification is enabled, otherwise it returns a map with a "follow_link" entry
-// containing the team sign-up link.
-func (c *Client) SignupTeam(email string, displayName string) (*Result, *AppError) {
- m := make(map[string]string)
- m["email"] = email
- m["display_name"] = displayName
- if r, err := c.DoApiPost("/teams/signup", MapToJson(m)); err != nil {
- return nil, err
- } else {
- defer closeBody(r)
- return &Result{r.Header.Get(HEADER_REQUEST_ID),
- r.Header.Get(HEADER_ETAG_SERVER), MapFromJson(r.Body)}, nil
- }
-}
-
// CreateTeam creates a team based on the provided Team struct. On success it returns
// the Team struct with the Id, CreateAt and other server-decided fields populated.
func (c *Client) CreateTeam(team *Team) (*Result, *AppError) {
diff --git a/model/team_signup.go b/model/team_signup.go
deleted file mode 100644
index e36420449..000000000
--- a/model/team_signup.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package model
-
-import (
- "encoding/json"
- "fmt"
- "io"
-)
-
-type TeamSignup struct {
- Team Team `json:"team"`
- User User `json:"user"`
- Invites []string `json:"invites"`
- Data string `json:"data"`
- Hash string `json:"hash"`
-}
-
-func TeamSignupFromJson(data io.Reader) *TeamSignup {
- decoder := json.NewDecoder(data)
- var o TeamSignup
- err := decoder.Decode(&o)
- if err == nil {
- return &o
- } else {
- fmt.Println(err)
-
- return nil
- }
-}
-
-func (o *TeamSignup) ToJson() string {
- b, err := json.Marshal(o)
- if err != nil {
- return ""
- } else {
- return string(b)
- }
-}
diff --git a/model/team_signup_test.go b/model/team_signup_test.go
deleted file mode 100644
index a830842aa..000000000
--- a/model/team_signup_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package model
-
-import (
- "strings"
- "testing"
-)
-
-func TestTeamSignupJson(t *testing.T) {
- team := Team{Id: NewId(), DisplayName: NewId()}
- o := TeamSignup{Team: team, Data: "data"}
- json := o.ToJson()
- ro := TeamSignupFromJson(strings.NewReader(json))
-
- if o.Team.Id != ro.Team.Id {
- t.Fatal("Ids do not match")
- }
-}