Fix for first time start where new users weren't offered the opportunity to create a new account (#372)

This commit is contained in:
Michael Green
2024-06-25 08:57:56 +10:00
committed by GitHub
parent cebab38dd6
commit 3897ed65ef
3 changed files with 86 additions and 53 deletions

View File

@@ -70,7 +70,8 @@ namespace gaseous_server.Controllers
[HttpGet] [HttpGet]
[Route("Version")] [Route("Version")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public Version GetSystemVersion() { public Version GetSystemVersion()
{
return Assembly.GetExecutingAssembly().GetName().Version; return Assembly.GetExecutingAssembly().GetName().Version;
} }
@@ -80,32 +81,36 @@ namespace gaseous_server.Controllers
[Route("VersionFile")] [Route("VersionFile")]
[AllowAnonymous] [AllowAnonymous]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public FileContentResult GetSystemVersionAsFile() { public FileContentResult GetSystemVersionAsFile()
{
Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString);
// get age ratings dictionary // get age ratings dictionary
Dictionary<int, string> ClassificationBoardsStrings = new Dictionary<int, string>(); Dictionary<int, string> ClassificationBoardsStrings = new Dictionary<int, string>();
foreach(IGDB.Models.AgeRatingCategory ageRatingCategory in Enum.GetValues(typeof(IGDB.Models.AgeRatingCategory)) ) foreach (IGDB.Models.AgeRatingCategory ageRatingCategory in Enum.GetValues(typeof(IGDB.Models.AgeRatingCategory)))
{ {
ClassificationBoardsStrings.Add((int)ageRatingCategory, ageRatingCategory.ToString()); ClassificationBoardsStrings.Add((int)ageRatingCategory, ageRatingCategory.ToString());
} }
Dictionary<int, string> AgeRatingsStrings = new Dictionary<int, string>(); Dictionary<int, string> AgeRatingsStrings = new Dictionary<int, string>();
foreach(IGDB.Models.AgeRatingTitle ageRatingTitle in Enum.GetValues(typeof(IGDB.Models.AgeRatingTitle)) ) foreach (IGDB.Models.AgeRatingTitle ageRatingTitle in Enum.GetValues(typeof(IGDB.Models.AgeRatingTitle)))
{ {
AgeRatingsStrings.Add((int)ageRatingTitle, ageRatingTitle.ToString()); AgeRatingsStrings.Add((int)ageRatingTitle, ageRatingTitle.ToString());
} }
string ver = "var AppVersion = \"" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + "\";" + Environment.NewLine + string ver = "var AppVersion = \"" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + "\";" + Environment.NewLine +
"var DBSchemaVersion = \"" + db.GetDatabaseSchemaVersion() + "\";" + Environment.NewLine + "var DBSchemaVersion = \"" + db.GetDatabaseSchemaVersion() + "\";" + Environment.NewLine +
"var FirstRunStatus = " + Config.ReadSetting<string>("FirstRunStatus", "0") + ";" + Environment.NewLine + "var FirstRunStatus = \"" + Config.ReadSetting<string>("FirstRunStatus", "0") + "\";" + Environment.NewLine +
"var AgeRatingBoardsStrings = " + JsonSerializer.Serialize(ClassificationBoardsStrings, new JsonSerializerOptions{ "var AgeRatingBoardsStrings = " + JsonSerializer.Serialize(ClassificationBoardsStrings, new JsonSerializerOptions
{
WriteIndented = true WriteIndented = true
}) + ";" + Environment.NewLine + }) + ";" + Environment.NewLine +
"var AgeRatingStrings = " + JsonSerializer.Serialize(AgeRatingsStrings, new JsonSerializerOptions{ "var AgeRatingStrings = " + JsonSerializer.Serialize(AgeRatingsStrings, new JsonSerializerOptions
{
WriteIndented = true WriteIndented = true
}) + ";" + Environment.NewLine + }) + ";" + Environment.NewLine +
"var AgeRatingGroups = " + JsonSerializer.Serialize(AgeGroups.AgeGroupingsFlat, new JsonSerializerOptions{ "var AgeRatingGroups = " + JsonSerializer.Serialize(AgeGroups.AgeGroupingsFlat, new JsonSerializerOptions
{
WriteIndented = true WriteIndented = true
}) + ";" + Environment.NewLine + }) + ";" + Environment.NewLine +
"var emulatorDebugMode = " + Config.ReadSetting<string>("emulatorDebugMode", false.ToString()).ToLower() + ";"; "var emulatorDebugMode = " + Config.ReadSetting<string>("emulatorDebugMode", false.ToString()).ToLower() + ";";
@@ -159,7 +164,7 @@ namespace gaseous_server.Controllers
{ {
// update task enabled // update task enabled
Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with enabled value " + TaskConfiguration.Enabled.ToString()); Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with enabled value " + TaskConfiguration.Enabled.ToString());
Config.SetSetting<string>("Enabled_" + TaskConfiguration.Task, TaskConfiguration.Enabled.ToString()); Config.SetSetting<string>("Enabled_" + TaskConfiguration.Task, TaskConfiguration.Enabled.ToString());
// update existing process // update existing process
@@ -170,12 +175,12 @@ namespace gaseous_server.Controllers
item.Enabled(Boolean.Parse(TaskConfiguration.Enabled.ToString())); item.Enabled(Boolean.Parse(TaskConfiguration.Enabled.ToString()));
} }
} }
// update task interval // update task interval
if (TaskConfiguration.Interval >= taskItem.MinimumAllowedInterval) if (TaskConfiguration.Interval >= taskItem.MinimumAllowedInterval)
{ {
Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with new interval " + TaskConfiguration.Interval); Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with new interval " + TaskConfiguration.Interval);
Config.SetSetting<string>("Interval_" + TaskConfiguration.Task, TaskConfiguration.Interval.ToString()); Config.SetSetting<string>("Interval_" + TaskConfiguration.Task, TaskConfiguration.Interval.ToString());
// update existing process // update existing process
@@ -194,7 +199,7 @@ namespace gaseous_server.Controllers
// update task weekdays // update task weekdays
Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with new weekdays " + String.Join(", ", TaskConfiguration.AllowedDays)); Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with new weekdays " + String.Join(", ", TaskConfiguration.AllowedDays));
Config.SetSetting<string>("AllowedDays_" + TaskConfiguration.Task, Newtonsoft.Json.JsonConvert.SerializeObject(TaskConfiguration.AllowedDays)); Config.SetSetting<string>("AllowedDays_" + TaskConfiguration.Task, Newtonsoft.Json.JsonConvert.SerializeObject(TaskConfiguration.AllowedDays));
// update existing process // update existing process
@@ -208,7 +213,7 @@ namespace gaseous_server.Controllers
// update task hours // update task hours
Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with new hours " + TaskConfiguration.AllowedStartHours + ":" + TaskConfiguration.AllowedStartMinutes.ToString("00") + " to " + TaskConfiguration.AllowedEndHours + ":" + TaskConfiguration.AllowedEndMinutes.ToString("00")); Logging.Log(Logging.LogType.Information, "Update Background Task", "Updating task " + TaskConfiguration.Task + " with new hours " + TaskConfiguration.AllowedStartHours + ":" + TaskConfiguration.AllowedStartMinutes.ToString("00") + " to " + TaskConfiguration.AllowedEndHours + ":" + TaskConfiguration.AllowedEndMinutes.ToString("00"));
Config.SetSetting<string>("AllowedStartHours_" + TaskConfiguration.Task, TaskConfiguration.AllowedStartHours.ToString()); Config.SetSetting<string>("AllowedStartHours_" + TaskConfiguration.Task, TaskConfiguration.AllowedStartHours.ToString());
Config.SetSetting<string>("AllowedStartMinutes_" + TaskConfiguration.Task, TaskConfiguration.AllowedStartMinutes.ToString()); Config.SetSetting<string>("AllowedStartMinutes_" + TaskConfiguration.Task, TaskConfiguration.AllowedStartMinutes.ToString());
Config.SetSetting<string>("AllowedEndHours_" + TaskConfiguration.Task, TaskConfiguration.AllowedEndHours.ToString()); Config.SetSetting<string>("AllowedEndHours_" + TaskConfiguration.Task, TaskConfiguration.AllowedEndHours.ToString());
@@ -225,7 +230,7 @@ namespace gaseous_server.Controllers
item.AllowedEndMinutes = TaskConfiguration.AllowedEndMinutes; item.AllowedEndMinutes = TaskConfiguration.AllowedEndMinutes;
} }
} }
} }
else else
{ {
@@ -251,7 +256,8 @@ namespace gaseous_server.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult GetSystemSettings() public ActionResult GetSystemSettings()
{ {
SystemSettingsModel systemSettingsModel = new SystemSettingsModel{ SystemSettingsModel systemSettingsModel = new SystemSettingsModel
{
AlwaysLogToDisk = Config.LoggingConfiguration.AlwaysLogToDisk, AlwaysLogToDisk = Config.LoggingConfiguration.AlwaysLogToDisk,
MinimumLogRetentionPeriod = Config.LoggingConfiguration.LogRetention, MinimumLogRetentionPeriod = Config.LoggingConfiguration.LogRetention,
EmulatorDebugMode = Boolean.Parse(Config.ReadSetting<string>("emulatorDebugMode", false.ToString())) EmulatorDebugMode = Boolean.Parse(Config.ReadSetting<string>("emulatorDebugMode", false.ToString()))
@@ -281,7 +287,8 @@ namespace gaseous_server.Controllers
private SystemInfo.PathItem GetDisk(string Path) private SystemInfo.PathItem GetDisk(string Path)
{ {
SystemInfo.PathItem pathItem = new SystemInfo.PathItem { SystemInfo.PathItem pathItem = new SystemInfo.PathItem
{
LibraryPath = Path, LibraryPath = Path,
SpaceUsed = Common.DirSize(new DirectoryInfo(Path)), SpaceUsed = Common.DirSize(new DirectoryInfo(Path)),
SpaceAvailable = new DriveInfo(Path).AvailableFreeSpace, SpaceAvailable = new DriveInfo(Path).AvailableFreeSpace,
@@ -293,11 +300,12 @@ namespace gaseous_server.Controllers
public class SystemInfo public class SystemInfo
{ {
public Version ApplicationVersion { public Version ApplicationVersion
{
get get
{ {
return Assembly.GetExecutingAssembly().GetName().Version; return Assembly.GetExecutingAssembly().GetName().Version;
} }
} }
public List<PathItem>? Paths { get; set; } public List<PathItem>? Paths { get; set; }
public long DatabaseSize { get; set; } public long DatabaseSize { get; set; }
@@ -352,7 +360,7 @@ namespace gaseous_server.Controllers
this.DefaultAllowedEndHours = 23; this.DefaultAllowedEndHours = 23;
this.DefaultAllowedEndMinutes = 59; this.DefaultAllowedEndMinutes = 59;
break; break;
case ProcessQueue.QueueItemType.TitleIngestor: case ProcessQueue.QueueItemType.TitleIngestor:
this._UserManageable = true; this._UserManageable = true;
this.DefaultInterval = 1; this.DefaultInterval = 1;
@@ -589,7 +597,8 @@ namespace gaseous_server.Controllers
} }
private bool _UserManageable; private bool _UserManageable;
public bool UserManageable => _UserManageable; public bool UserManageable => _UserManageable;
public int Interval { public int Interval
{
get get
{ {
return int.Parse(Config.ReadSetting<string>("Interval_" + Task, DefaultInterval.ToString())); return int.Parse(Config.ReadSetting<string>("Interval_" + Task, DefaultInterval.ToString()));
@@ -642,7 +651,7 @@ namespace gaseous_server.Controllers
public List<ProcessQueue.QueueItemType> Blocks public List<ProcessQueue.QueueItemType> Blocks
{ {
get get
{ {
if (_Blocks.Contains(ProcessQueue.QueueItemType.All)) if (_Blocks.Contains(ProcessQueue.QueueItemType.All))
{ {
List<ProcessQueue.QueueItemType> blockList = new List<ProcessQueue.QueueItemType>(); List<ProcessQueue.QueueItemType> blockList = new List<ProcessQueue.QueueItemType>();

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<script src="/api/v1.1/System/VersionFile"></script> <script src="/api/v1.1/System/VersionFile"></script>
@@ -44,48 +45,56 @@
var userProfile; var userProfile;
</script> </script>
</head> </head>
<body> <body>
<!-- Notifications --> <!-- Notifications -->
<div id="notifications_target"></div> <div id="notifications_target"></div>
<div id="banner_icon" onclick="window.location.href = '/index.html';"> <div id="banner_icon" onclick="window.location.href = '/index.html';">
<img src="/images/logo.png" alt="Gaseous" id="banner_icon_image" /> <img src="/images/logo.png" alt="Gaseous" id="banner_icon_image" />
</div> </div>
<div id="banner_header"> <div id="banner_header">
<div id="bannerButtons"> <div id="bannerButtons">
<div id="banner_user" onclick="showMenu();" class="banner_button dropdown dropbtn"> <div id="banner_user" onclick="showMenu();" class="banner_button dropdown dropbtn">
<img src="/images/user.svg" alt="Account" title="Account" id="banner_user_image" class="banner_button_image" style="position: relative; top: 10px; right: 0px; pointer-events: none;" onclick="showMenu();" /> <img src="/images/user.svg" alt="Account" title="Account" id="banner_user_image"
class="banner_button_image" style="position: relative; top: 10px; right: 0px; pointer-events: none;"
onclick="showMenu();" />
<div id="myDropdown" class="dropdown-content"> <div id="myDropdown" class="dropdown-content">
<div id="banner_user_roles"></div> <div id="banner_user_roles"></div>
<a href="#" onclick="showDialog('userprofile');">Profile</a> <a href="#" onclick="showDialog('userprofile');">Profile</a>
<a href="#" onclick="userLogoff();">Sign Out</a> <a href="#" onclick="userLogoff();">Sign Out</a>
</div> </div>
</div> </div>
<div id="banner_cog" onclick="window.location.href = '/index.html?page=settings';" class="banner_button"> <div id="banner_cog" onclick="window.location.href = '/index.html?page=settings';" class="banner_button">
<img src="/images/settings.svg" alt="Settings" title="Settings" id="banner_system_image" class="banner_button_image" /> <img src="/images/settings.svg" alt="Settings" title="Settings" id="banner_system_image"
class="banner_button_image" />
<span id="banner_system_label">Settings</span> <span id="banner_system_label">Settings</span>
</div> </div>
<div id="banner_upload" onclick="showDialog('upload');" class="banner_button"> <div id="banner_upload" onclick="showDialog('upload');" class="banner_button">
<img src="/images/upload.svg" alt="Upload" title="Upload" id="banner_upload_image" class="banner_button_image" /> <img src="/images/upload.svg" alt="Upload" title="Upload" id="banner_upload_image"
class="banner_button_image" />
<span id="banner_upload_label">Upload</span> <span id="banner_upload_label">Upload</span>
</div> </div>
<div id="banner_collections" onclick="window.location.href = '/index.html?page=collections';" class="banner_button"> <div id="banner_collections" onclick="window.location.href = '/index.html?page=collections';"
<img src="/images/collections.svg" alt="Collections" title="Collections" id="banner_collections_image" class="banner_button_image" /> class="banner_button">
<img src="/images/collections.svg" alt="Collections" title="Collections" id="banner_collections_image"
class="banner_button_image" />
<span id="banner_collections_label">Collections</span> <span id="banner_collections_label">Collections</span>
</div> </div>
<div id="banner_library" onclick="window.location.href = '/index.html';" class="banner_button"> <div id="banner_library" onclick="window.location.href = '/index.html';" class="banner_button">
<img src="/images/library.svg" alt="Library" title="Library" id="banner_library_image" class="banner_button_image" /> <img src="/images/library.svg" alt="Library" title="Library" id="banner_library_image"
class="banner_button_image" />
<span id="banner_library_label">Library</span> <span id="banner_library_label">Library</span>
</div> </div>
</div> </div>
<div id="banner_header_label" onclick="window.location.href = '/index.html';">Gaseous Games</div> <div id="banner_header_label" onclick="window.location.href = '/index.html';">Gaseous Games</div>
</div> </div>
<div id="content"> <div id="content">
@@ -97,7 +106,9 @@
<!-- Modal content --> <!-- Modal content -->
<div class="modal-content"> <div class="modal-content">
<span class="close">&times;</span> <span class="close">&times;</span>
<div><h1 id="modal-heading">Modal heading</h1></div> <div>
<h1 id="modal-heading">Modal heading</h1>
</div>
<div id="modal-content">Some text in the Modal..</div> <div id="modal-content">Some text in the Modal..</div>
</div> </div>
@@ -118,7 +129,7 @@
var modalVariables = null; var modalVariables = null;
// redirect if first run status = 0 // redirect if first run status = 0
if (FirstRunStatus == 0) { if (FirstRunStatus == 0 || FirstRunStatus == "0") {
window.location.replace("/pages/first.html"); window.location.replace("/pages/first.html");
} }
@@ -126,7 +137,7 @@
ajaxCall( ajaxCall(
'/api/v1.1/Account/Profile/Basic', '/api/v1.1/Account/Profile/Basic',
'GET', 'GET',
function(result) { function (result) {
console.log("User is logged in"); console.log("User is logged in");
userProfile = result; userProfile = result;
@@ -137,7 +148,7 @@
if (!userProfile.roles.includes("Admin") && !userProfile.roles.includes("Gamer")) { if (!userProfile.roles.includes("Admin") && !userProfile.roles.includes("Gamer")) {
uploadButton.style.display = 'none'; uploadButton.style.display = 'none';
} }
// populate page // populate page
var myParam = getQueryString('page', 'string'); var myParam = getQueryString('page', 'string');
@@ -147,7 +158,7 @@
$('#content').load('/pages/' + myParam + '.html?v=' + AppVersion); $('#content').load('/pages/' + myParam + '.html?v=' + AppVersion);
}, },
function(error) { function (error) {
window.location.replace("/pages/login.html"); window.location.replace("/pages/login.html");
} }
); );
@@ -159,15 +170,15 @@
} }
// Close the dropdown menu if the user clicks outside of it // Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) { window.onclick = function (event) {
if (!event.target.matches('.dropbtn')) { if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content"); var dropdowns = document.getElementsByClassName("dropdown-content");
var i; var i;
for (i = 0; i < dropdowns.length; i++) { for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i]; var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) { if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show'); openDropdown.classList.remove('show');
} }
} }
} }
} }
@@ -186,4 +197,5 @@
} }
</script> </script>
</body> </body>
</html>
</html>

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<script src="/api/v1.1/System/VersionFile"></script> <script src="/api/v1.1/System/VersionFile"></script>
@@ -40,8 +41,10 @@
} }
</script> </script>
</head> </head>
<body> <body>
<div id="bgImage" style="background-image: url('/images/LoginWallpaper.jpg'); background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(10px); -webkit-filter: blur(10px);"> <div id="bgImage"
style="background-image: url('/images/LoginWallpaper.jpg'); background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(10px); -webkit-filter: blur(10px);">
<div id="bgImage_Opacity"></div> <div id="bgImage_Opacity"></div>
</div> </div>
@@ -52,7 +55,9 @@
<div id="loginwindow_header_label" style="display: block; text-align: center;">Gaseous Games</div> <div id="loginwindow_header_label" style="display: block; text-align: center;">Gaseous Games</div>
<button type="button" value="Get Started" onclick="document.getElementById('first_welcome').style.display = 'none'; document.getElementById('first_newadmin').style.display = '';" class="bigbutton">Get Started</button> <button type="button" value="Get Started"
onclick="document.getElementById('first_welcome').style.display = 'none'; document.getElementById('first_newadmin').style.display = '';"
class="bigbutton">Get Started</button>
</div> </div>
</div> </div>
<div class="loginwindow" id="first_newadmin" style="display: none;"> <div class="loginwindow" id="first_newadmin" style="display: none;">
@@ -67,15 +72,18 @@
</tr> </tr>
<tr> <tr>
<th>Email</th> <th>Email</th>
<td><input type="email" id="login_email" style="width: 95%;" onkeyup="checkPasswordsMatch();" /></td> <td><input type="email" id="login_email" style="width: 95%;" onkeyup="checkPasswordsMatch();" />
</td>
</tr> </tr>
<tr> <tr>
<th>New Password</th> <th>New Password</th>
<td><input type="password" id="login_password" style="width: 95%;" onkeyup="checkPasswordsMatch();" /></td> <td><input type="password" id="login_password" style="width: 95%;"
onkeyup="checkPasswordsMatch();" /></td>
</tr> </tr>
<tr> <tr>
<th>Confirm Password</th> <th>Confirm Password</th>
<td><input type="password" id="login_confirmpassword" style="width: 95%;" onkeyup="checkPasswordsMatch();" /></td> <td><input type="password" id="login_confirmpassword" style="width: 95%;"
onkeyup="checkPasswordsMatch();" /></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" id="login_passwordnotice">&nbsp;</td> <td colspan="2" id="login_passwordnotice">&nbsp;</td>
@@ -85,7 +93,9 @@
</tr> </tr>
<tr> <tr>
<td colspan="2" style="padding-top: 20px;"> <td colspan="2" style="padding-top: 20px;">
<button id="login_createaccount" type="button" value="Create Account" onclick="registerAccount();" disabled="disabled" class="bigbutton">Create Account</button> <button id="login_createaccount" type="button" value="Create Account"
onclick="registerAccount();" disabled="disabled" class="bigbutton">Create
Account</button>
</td> </td>
</tr> </tr>
</table> </table>
@@ -94,12 +104,14 @@
</div> </div>
<div id="settings_photocredit"> <div id="settings_photocredit">
Wallpaper by <a href="https://unsplash.com/@spideyjoey" class="romlink">Joey Kwok</a> / <a href="https://unsplash.com/photos/a-room-filled-with-arcade-machines-and-neon-lights-jbIsTd7rdd8" class="romlink">Unsplash</a> Wallpaper by <a href="https://unsplash.com/@spideyjoey" class="romlink">Joey Kwok</a> / <a
href="https://unsplash.com/photos/a-room-filled-with-arcade-machines-and-neon-lights-jbIsTd7rdd8"
class="romlink">Unsplash</a>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
// redirect if first run status != 0 as 0 indicates that first run needs to be run // redirect if first run status != 0 as 0 indicates that first run needs to be run
if (FirstRunStatus != 0) { if (FirstRunStatus != 0 && FirstRunStatus != "0") {
window.location.replace("/"); window.location.replace("/");
} }
@@ -146,10 +158,10 @@
ajaxCall( ajaxCall(
'/api/v1.1/FirstSetup/0', '/api/v1.1/FirstSetup/0',
'POST', 'POST',
function(result){ function (result) {
loginCallback(result); loginCallback(result);
}, },
function(error){ function (error) {
loginCallback(error); loginCallback(error);
}, },
JSON.stringify(model) JSON.stringify(model)