From 21bf1014e55ab8049e18ee991c6ee80b23d1789c Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 23 Aug 2016 14:48:01 +0500 Subject: Implement cache for users objects --- src/org/traccar/api/resource/SessionResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/api/resource/SessionResource.java') diff --git a/src/org/traccar/api/resource/SessionResource.java b/src/org/traccar/api/resource/SessionResource.java index 49670c1f9..deed70b37 100644 --- a/src/org/traccar/api/resource/SessionResource.java +++ b/src/org/traccar/api/resource/SessionResource.java @@ -73,7 +73,7 @@ public class SessionResource extends BaseResource { } if (userId != null) { - return Context.getDataManager().getUser(userId); + return Context.getPermissionsManager().getUser(userId); } else { throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build()); } @@ -83,7 +83,7 @@ public class SessionResource extends BaseResource { @POST public User add( @FormParam("email") String email, @FormParam("password") String password) throws SQLException { - User user = Context.getDataManager().login(email, password); + User user = Context.getPermissionsManager().login(email, password); if (user != null) { request.getSession().setAttribute(USER_ID_KEY, user.getId()); return user; -- cgit v1.2.3