diff options
Diffstat (limited to 'Backend')
-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"); } } } |