This commit is contained in:
@@ -60,6 +60,11 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
var UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||
|
||||
//Different than normal here: a user is *always* allowed to retrieve their own user options object
|
||||
@@ -68,11 +73,6 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(401, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
UserOptionsBiz biz = new UserOptionsBiz(ct, UserId, UserRolesFromContext.Roles(HttpContext.Items));
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ namespace AyaNova
|
||||
// ******************** TESTING WIPE DB *****************************
|
||||
//
|
||||
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
|
||||
var TESTING_REFRESH_DB = true;//#######################################################################################
|
||||
var TESTING_REFRESH_DB = false;//#######################################################################################
|
||||
|
||||
#if (DEBUG)
|
||||
//TESTING
|
||||
@@ -438,7 +438,7 @@ namespace AyaNova
|
||||
{
|
||||
context.Request.Path = "/index.html";
|
||||
context.Response.StatusCode = 200;
|
||||
context.Response.ContentType = "text/html";
|
||||
context.Response.ContentType = "text/html";
|
||||
await context.Response.SendFileAsync(Path.Combine(env.WebRootPath, "index.html"));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user