MCPcopy Create free account
hub / github.com/GmpABR/NexusFlow / GetMyTasks

Method GetMyTasks

backend/Controllers/UsersController.cs:171–198  ·  view source on GitHub ↗

── GET /api/users/me/tasks ──────────────────────────────────────────

()

Source from the content-addressed store, hash-verified

169
170 // ── GET /api/users/me/tasks ──────────────────────────────────────────
171 [HttpGet("me/tasks")]
172 public async Task<ActionResult<IEnumerable<MyTaskDto>>> GetMyTasks()
173 {
174 var userId = GetUserId();
175
176 var tasks = await _context.TaskCards
177 .Where(t => t.AssigneeId == userId || t.Assignees.Any(a => a.UserId == userId))
178 .Include(t => t.Column)
179 .ThenInclude(c => c.Board)
180 .OrderBy(t => t.DueDate)
181 .Select(t => new MyTaskDto
182 {
183 Id = t.Id,
184 Title = t.Title,
185 Description = t.Description,
186 Priority = t.Priority,
187 DueDate = t.DueDate,
188 StoryPoints = t.StoryPoints,
189 Tags = t.Tags,
190 ColumnId = t.ColumnId,
191 ColumnName = t.Column.Name,
192 BoardId = t.Column.Board.Id,
193 BoardName = t.Column.Board.Name
194 })
195 .ToListAsync();
196
197 return Ok(tasks);
198 }
199
200 private int GetUserId()
201 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected