diff options
author | Chris <ccbrown112@gmail.com> | 2018-03-07 12:36:40 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 12:36:40 -0600 |
commit | e8943936c51450540a4f2e8e7a2f3a2af90d14db (patch) | |
tree | bc7d32557780a2235a4f9a878d3b0841a1df0bda /api/context.go | |
parent | fd9ee780ed713c10f122f9eb83e07bfdf09ce4a4 (diff) | |
download | chat-e8943936c51450540a4f2e8e7a2f3a2af90d14db.tar.gz chat-e8943936c51450540a4f2e8e7a2f3a2af90d14db.tar.bz2 chat-e8943936c51450540a4f2e8e7a2f3a2af90d14db.zip |
general cleanup (#8387)
Diffstat (limited to 'api/context.go')
-rw-r--r-- | api/context.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/api/context.go b/api/context.go index a8ff2b694..1eb1e3f4f 100644 --- a/api/context.go +++ b/api/context.go @@ -364,10 +364,6 @@ func NewInvalidParamError(where string, name string) *model.AppError { return err } -func (c *Context) SetUnknownError(where string, details string) { - c.Err = model.NewAppError(where, "api.context.unknown.app_error", nil, details, http.StatusInternalServerError) -} - func (c *Context) SetPermissionError(permission *model.Permission) { c.Err = model.NewAppError("Permissions", "api.context.permissions.app_error", nil, "userId="+c.Session.UserId+", "+"permission="+permission.Id, http.StatusForbidden) } @@ -387,11 +383,6 @@ func (c *Context) SetSiteURLHeader(url string) { c.siteURLHeader = strings.TrimRight(url, "/") } -// TODO see where these are used -func (c *Context) GetTeamURLFromTeam(team *model.Team) string { - return c.GetSiteURLHeader() + "/" + team.Name -} - func (c *Context) GetTeamURL() string { if !c.teamURLValid { c.SetTeamURLFromSession() @@ -406,10 +397,6 @@ func (c *Context) GetSiteURLHeader() string { return c.siteURLHeader } -func (c *Context) GetCurrentTeamMember() *model.TeamMember { - return c.Session.GetTeamByTeamId(c.TeamId) -} - func (c *Context) HandleEtag(etag string, routeName string, w http.ResponseWriter, r *http.Request) bool { metrics := c.App.Metrics if et := r.Header.Get(model.HEADER_ETAG_CLIENT); len(etag) > 0 { |