File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,20 @@ public UsersController(MongoDbService mongoDbService)
1818 _mongoDbService = mongoDbService ;
1919 }
2020
21+ // Returns all users (passwords stripped) for assignment dropdowns
22+ [ HttpGet ]
23+ public IActionResult GetAll ( )
24+ {
25+ var db = _mongoDbService . GetDatabase ( ) ;
26+ var usersCollection = db . GetCollection < User > ( "user" ) ;
27+ var users = usersCollection . Find ( _ => true ) . ToList ( ) ;
28+ foreach ( var u in users )
29+ {
30+ u . Password = string . Empty ;
31+ }
32+ return Ok ( users ) ;
33+ }
34+
2135 // Returns the current user based on JWT
2236 [ HttpGet ( "me" ) ]
2337 public IActionResult Me ( )
Original file line number Diff line number Diff line change @@ -55,17 +55,17 @@ Authorization: Bearer {{login.response.body.token}}
5555
5656{
5757 "category" : " design" ,
58- "assignedTo" : " 690d04b90943671dbf22f65e " ,
59- "title" : " WHOOO WawdawdcdawNY " ,
58+ "assignedTo" : " {{login.response.body.user.id}} " ,
59+ "title" : " Pakyu Sam " ,
6060 "description" : " TESTINGS POTAs." ,
6161 "priority" : " Important" ,
6262 "status" : " to do" ,
6363 "startDate" : " 2025-11-06T09:00:00Z" ,
6464 "endDate" : " 2025-11-13T17:00:00Z" ,
65- "createdBy" : " 690d04b90943671dbf22f65e " ,
65+ "createdBy" : " {{login.response.body.user.id}} " ,
6666 "comments" : [
6767 {
68- "authorId" : " 690d04b90943671dbf22f65e " ,
68+ "authorId" : " {{login.response.body.user.id}} " ,
6969 "text" : " Initial task created" ,
7070 "createdAt" : " 2025-11-06T09:05:00Z"
7171 }
You can’t perform that action at this time.
0 commit comments