From e8943936c51450540a4f2e8e7a2f3a2af90d14db Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 7 Mar 2018 12:36:40 -0600 Subject: general cleanup (#8387) --- api/context.go | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'api') 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 { -- cgit v1.2.3-1-g7c22