aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/api/api/Controllers/UserController.cs7
-rw-r--r--backend/api/api/appsettings.json4
2 files changed, 7 insertions, 4 deletions
diff --git a/backend/api/api/Controllers/UserController.cs b/backend/api/api/Controllers/UserController.cs
index b1544477..a106880e 100644
--- a/backend/api/api/Controllers/UserController.cs
+++ b/backend/api/api/Controllers/UserController.cs
@@ -56,10 +56,11 @@ namespace api.Controllers
{
var existingUser = userService.Get(id);
+ //ne mora da se proverava
if(existingUser == null)
return NotFound($"User with Id = {id} not found");
- userService.Update(id, existingUser);
+ userService.Update(id, user);
return NoContent();
}
@@ -79,9 +80,7 @@ namespace api.Controllers
}
/*
{
- "userId": {
- "$oid": "62276146c4a20eabc664abc3"
- },
+ "_id": "",
"username" : "ivan996sk",
"email" : "ivan996sk@gmail.com",
"password" : "proba",
diff --git a/backend/api/api/appsettings.json b/backend/api/api/appsettings.json
index d2c95254..257c2f45 100644
--- a/backend/api/api/appsettings.json
+++ b/backend/api/api/appsettings.json
@@ -13,5 +13,9 @@
"ConnectionString": "mongodb://127.0.0.1:27017/",
"DatabaseName": "si_project",
"CollectionName": "User"
+ /* "ConnectionString": "mongodb+srv://SIDatabase:SIDatabase@sidatabase.twtfm.mongodb.net/myFirstDatabase?retryWrites=true&w=majority",
+ "DatabaseName": "si_db",
+ "CollectionName": "users"
+ */
}
}