Migration to using System.Net.Http.Json; part one - functional migration
This commit is contained in:
@ -63,10 +63,12 @@ namespace Oqtane.Controllers
|
||||
}
|
||||
|
||||
// get sync events
|
||||
alias.SyncDate = DateTime.UtcNow;
|
||||
alias.SyncEvents = _syncManager.GetSyncEvents(DateTime.ParseExact(lastsyncdate, "yyyyMMddHHmmssfff", CultureInfo.InvariantCulture));
|
||||
|
||||
return alias;
|
||||
if (alias != null)
|
||||
{
|
||||
alias.SyncDate = DateTime.UtcNow;
|
||||
alias.SyncEvents = _syncManager.GetSyncEvents(DateTime.ParseExact(lastsyncdate, "yyyyMMddHHmmssfff", CultureInfo.InvariantCulture));
|
||||
}
|
||||
return alias;
|
||||
}
|
||||
|
||||
// POST api/<controller>
|
||||
|
@ -42,12 +42,7 @@ namespace Oqtane
|
||||
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc(opt =>
|
||||
{
|
||||
// remove formatter that turns nulls into 204 - No Content responses
|
||||
// sends JSON null instead
|
||||
opt.OutputFormatters.RemoveType<HttpNoContentOutputFormatter>();
|
||||
}).AddNewtonsoftJson();
|
||||
services.AddMvc().AddNewtonsoftJson();
|
||||
services.AddServerSideBlazor();
|
||||
|
||||
// setup HttpClient for server side in a client side compatible fashion ( with auth cookie )
|
||||
|
Reference in New Issue
Block a user