diff options
author | Ruzette Tanyag <ruzette@users.noreply.github.com> | 2017-02-17 10:31:01 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-02-17 10:31:01 -0500 |
commit | 4e7dbc3bb0e93bafa684594b19c5648dc030ee17 (patch) | |
tree | 618d2b57861650c52ed4a74ddd7730b944991a11 /app | |
parent | 2f96814a8bca991a2acba3b66c38c22cfddef769 (diff) | |
download | chat-4e7dbc3bb0e93bafa684594b19c5648dc030ee17.tar.gz chat-4e7dbc3bb0e93bafa684594b19c5648dc030ee17.tar.bz2 chat-4e7dbc3bb0e93bafa684594b19c5648dc030ee17.zip |
Implement user sessions endpoints for APIv4 (#5449)
* added get session and revoke session endpoints, unittests and drivers
* removed BasicUser2 and added teardown
* added badrequest unit test case for sessions
* added session loop to check if user id and session user id matches
* fixed indentation issues for user_test
* match indentation from spaces to tabs
Diffstat (limited to 'app')
-rw-r--r-- | app/session.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/session.go b/app/session.go index 83e5f343a..2207ed869 100644 --- a/app/session.go +++ b/app/session.go @@ -4,6 +4,7 @@ package app import ( + "net/http" "github.com/mattermost/platform/einterfaces" "github.com/mattermost/platform/model" "github.com/mattermost/platform/utils" @@ -148,6 +149,7 @@ func RevokeSessionsForDeviceId(userId string, deviceId string, currentSessionId func RevokeSessionById(sessionId string) *model.AppError { if result := <-Srv.Store.Session().Get(sessionId); result.Err != nil { + result.Err.StatusCode = http.StatusBadRequest return result.Err } else { return RevokeSession(result.Data.(*model.Session)) |