From fa95cc5ec3db06a27d0a3898f89032d661120af1 Mon Sep 17 00:00:00 2001 From: Oliver Pelly Date: Wed, 8 Apr 2026 12:18:07 -0700 Subject: [PATCH] added fixes to call sights of GetMyStudentsAsync where scope was not provided. Call sights expected "all" scope, but default was "my" scope. --- api/src/Controllers/StudentController.cs | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/api/src/Controllers/StudentController.cs b/api/src/Controllers/StudentController.cs index d6a744e..a2a5470 100644 --- a/api/src/Controllers/StudentController.cs +++ b/api/src/Controllers/StudentController.cs @@ -53,7 +53,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, idProgram, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, idProgram, role, "all"); return Ok(new ResponseResult> { @@ -76,7 +76,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -109,7 +109,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -142,7 +142,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -176,7 +176,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -250,7 +250,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -283,7 +283,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -327,7 +327,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { return NotFound(new ResponseResult @@ -395,7 +395,7 @@ public class StudentController : BaseController }); } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(studentId.Value)) { @@ -469,7 +469,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -511,7 +511,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -552,7 +552,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -602,7 +602,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) { @@ -635,7 +635,7 @@ public class StudentController : BaseController return error; } - var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role); + var students = await _studentRepository.GetMyStudentsAsync(userId, programId, role, "all"); if (!students.Select(s => s.StudentId).Contains(idStudent)) {