mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 02:06:43 +00:00
Fix 500 internal error when autologin option is not specified in the config
This commit is contained in:
parent
5de909cd9c
commit
bbaa338469
@ -15,7 +15,7 @@ public class PlayPage implements TemplateViewRoute {
|
|||||||
public ModelAndView handle(Request request, Response response) {
|
public ModelAndView handle(Request request, Response response) {
|
||||||
|
|
||||||
String autoLogin = GameServer.INSTANCE.getConfig().getString("autologin");
|
String autoLogin = GameServer.INSTANCE.getConfig().getString("autologin");
|
||||||
if (!autoLogin.equals("")) {
|
if (autoLogin != null && !autoLogin.equals("")) {
|
||||||
AlertMessage[] messages = {new AlertMessage("Logged in as " + autoLogin, AlertType.SUCCESS)};
|
AlertMessage[] messages = {new AlertMessage("Logged in as " + autoLogin, AlertType.SUCCESS)};
|
||||||
request.session().attribute("messages", messages);
|
request.session().attribute("messages", messages);
|
||||||
request.session().attribute("username", autoLogin);
|
request.session().attribute("username", autoLogin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user