Commit 47de34f3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

small refactor in response for login/logout methods to avoid exceptions in logs

parent 92f5349b
......@@ -56,9 +56,7 @@ public class UserController extends BaseController {
cookie.setPath(cookiePath);
response.addCookie(cookie);
response.getWriter().write("{\"info\":\"Login successful. TOKEN returned as a cookie\"}");
response.getWriter().flush();
response.getWriter().close();
result.put("info", "Login successful. TOKEN returned as a cookie");
return result;
}
}
......@@ -90,9 +88,7 @@ public class UserController extends BaseController {
cookie.setPath(cookiePath);
response.addCookie(cookie);
response.getWriter().write("{\"status\":\"OK\"}");
response.getWriter().flush();
response.getWriter().close();
result.put("status", "OK");
return result;
}
......
Markdown is supported
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