mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 14:37:34 +00:00
some changes
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class AuthRepository
|
||||
string? userAgent)
|
||||
{
|
||||
using var db = Connection;
|
||||
var result = await db.QuerySingleOrDefaultAsync<string?>(
|
||||
var result = await db.QuerySingleOrDefaultAsync<Guid?>(
|
||||
"sp_RefreshToken_Create",
|
||||
new
|
||||
{
|
||||
@@ -33,7 +33,7 @@ public class AuthRepository
|
||||
p_user_agent = userAgent
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
return result != null ? Guid.Parse(result) : null;
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<dbRefreshToken?> GetRefreshTokenByIdAsync(Guid refreshTokenId)
|
||||
|
||||
Reference in New Issue
Block a user