Commit 4a64f4d3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '261-stacktrace-in-logs' into 'devel_11.0.x'

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

See merge request piotr.gawron/minerva!178
parents 92f5349b 47de34f3
......@@ -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