some changes

This commit is contained in:
2026-02-21 16:39:38 -08:00
parent 7348785e8a
commit 6f6123559e
6 changed files with 58 additions and 8 deletions
+8
View File
@@ -19,6 +19,14 @@ public class StudentController : BaseController
[ProducesResponseType(typeof(ResponseResult<IEnumerable<StudentResponse>>), StatusCodes.Status200OK)]
public async Task<ActionResult<ResponseResult<IEnumerable<StudentResponse>>>> GetAll()
{
var (userId, email, programId, role, error) = GetProgramUserFromClaims();
if (error is not null)
{
return error;
}
var students = await _studentRepository.GetAllAsync();
var response = students.Select(StudentResponse.FromDatabaseModel);