Skip to content
Snippets Groups Projects
Commit 6d09b1ef authored by Julian Hochstetter's avatar Julian Hochstetter
Browse files

return null and then 404 if session is not found

parent 14fd1ec8
Branches
Tags
No related merge requests found
...@@ -147,6 +147,9 @@ public class CouchDBDao implements IDatabaseDao { ...@@ -147,6 +147,9 @@ public class CouchDBDao implements IDatabaseDao {
@Override @Override
public Session getSession(String keyword) { public Session getSession(String keyword) {
Session result = this.getSessionFromKeyword(keyword); Session result = this.getSessionFromKeyword(keyword);
if(result == null) {
return null;
}
if (result.isActive() || result.getCreator().equals(this.actualUserName())) { if (result.isActive() || result.getCreator().equals(this.actualUserName())) {
sessionService.addUserToSessionMap(this.actualUserName(), keyword); sessionService.addUserToSessionMap(this.actualUserName(), keyword);
return result; return result;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment