diff options
author | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-10-29 23:30:08 +0200 |
---|---|---|
committer | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-10-29 23:30:08 +0200 |
commit | 9f8d6ef3f15f71be7ad4212d943fa13c0f6de072 (patch) | |
tree | 78f445f42a5664ec8b502be20ed841e08358356e /Backend/Api | |
parent | 755628272aa6ef01c6909880c2979a88a3d01190 (diff) |
Sitne ispravke. Popravljeno citanje json response-a.
Diffstat (limited to 'Backend/Api')
-rw-r--r-- | Backend/Api/Api/Controllers/AuthController.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Backend/Api/Api/Controllers/AuthController.cs b/Backend/Api/Api/Controllers/AuthController.cs index 6727125..5973c8c 100644 --- a/Backend/Api/Api/Controllers/AuthController.cs +++ b/Backend/Api/Api/Controllers/AuthController.cs @@ -22,7 +22,7 @@ namespace Api.Controllers novi.password = creds.password; novi.username = creds.username; novi.name = creds.name; - novi.creationDate = DateTime.Now; + novi.creationDate = DateTime.Now.ToUniversalTime(); novi._id = ""; int ret= await _userService.createUser(novi); @@ -42,9 +42,9 @@ namespace Api.Controllers var jwt= await _userService.Login(creds); if (jwt != null) { - return Ok(new { token = jwt }); + return Ok(jwt); } - return BadRequest(); + return BadRequest("Pogresno uneti podaci"); } } } |