diff options
author | enahum <nahumhbl@gmail.com> | 2017-04-03 14:37:58 -0300 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-04-03 10:37:58 -0700 |
commit | 1cbe6e797517089140ee2db12d73c0781f5e3e6b (patch) | |
tree | 5671819dcbfdc6f359410e3558135090d3724e4c /api/oauth.go | |
parent | 68bb5a2ec85a6d34726a137bad65157d0ff65247 (diff) | |
download | chat-1cbe6e797517089140ee2db12d73c0781f5e3e6b.tar.gz chat-1cbe6e797517089140ee2db12d73c0781f5e3e6b.tar.bz2 chat-1cbe6e797517089140ee2db12d73c0781f5e3e6b.zip |
Add more OAuth unit tests (#5946)
Diffstat (limited to 'api/oauth.go')
-rw-r--r-- | api/oauth.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/api/oauth.go b/api/oauth.go index 25d4a89f9..754c49564 100644 --- a/api/oauth.go +++ b/api/oauth.go @@ -901,11 +901,6 @@ func deauthorizeOAuthApp(c *Context, w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) id := params["id"] - if len(id) == 0 { - c.SetInvalidParam("deauthorizeOAuthApp", "id") - return - } - // revoke app sessions if result := <-app.Srv.Store.OAuth().GetAccessDataByUserForApp(c.Session.UserId, id); result.Err != nil { c.Err = result.Err @@ -946,11 +941,6 @@ func regenerateOAuthSecret(c *Context, w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) id := params["id"] - if len(id) == 0 { - c.SetInvalidParam("regenerateOAuthSecret", "id") - return - } - var oauthApp *model.OAuthApp if result := <-app.Srv.Store.OAuth().GetApp(id); result.Err != nil { c.Err = model.NewLocAppError("regenerateOAuthSecret", "api.oauth.allow_oauth.database.app_error", nil, "") |