diff --git a/api/src/DataAccess/Repositories/StudentRepository.cs b/api/src/DataAccess/Repositories/StudentRepository.cs index 43f0bc0..3846bc6 100644 --- a/api/src/DataAccess/Repositories/StudentRepository.cs +++ b/api/src/DataAccess/Repositories/StudentRepository.cs @@ -87,7 +87,7 @@ public class StudentRepository public async Task AddProgressEventAsync(Guid userId, AddProgressEventDto dto) { using var db = Connection; - var rowsAffected = await db.ExecuteAsync( + var row = await db.QuerySingleOrDefaultAsync( "sp_ProgressEvent_Insert", new { @@ -98,7 +98,7 @@ public class StudentRepository p_is_sensitive = dto.IsSensitive ? 1 : 0 }, commandType: CommandType.StoredProcedure); - return rowsAffected > 0; + return row is not null; } public async Task InsertGoalAsync(Guid idStudent, Guid userId, CreateGoalDto dto)