fix null value handling?

This commit is contained in:
Miss Pasture 2021-07-17 22:36:03 -04:00
parent 7e1163c3d4
commit 6e9a3bc100

View file

@ -80,7 +80,10 @@ namespace BirdsiteLive.Controllers
{
if (user == null) return NotFound();
var apUser = _userService.GetUser(user);
var jsonApUser = JsonConvert.SerializeObject(apUser);
var jsonApUser = JsonConvert.SerializeObject(apUser, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
});
return Content(jsonApUser, "application/activity+json; charset=utf-8");
}
}