diff options
Diffstat (limited to 'backend/Elements.Backend/Controllers/UserController.cs')
| -rw-r--r-- | backend/Elements.Backend/Controllers/UserController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/Elements.Backend/Controllers/UserController.cs b/backend/Elements.Backend/Controllers/UserController.cs index bde93aa..c7bcbcb 100644 --- a/backend/Elements.Backend/Controllers/UserController.cs +++ b/backend/Elements.Backend/Controllers/UserController.cs @@ -35,7 +35,7 @@ public class UserController: ControllerBase if (user == null) return StatusCode(StatusCodes.Status500InternalServerError); - string userJson = JsonSerializer.Serialize(user); - return Ok(userJson); + var serializeOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; + return Ok(JsonSerializer.Serialize(user, serializeOptions)); } }
\ No newline at end of file |
