fix: лекции когда возвращались не говорили записан ли студент уже или нет

This commit is contained in:
2026-05-13 20:01:43 +03:00
parent 65e3d1bf18
commit d29b52f824
10 changed files with 79 additions and 13 deletions
@@ -31,13 +31,14 @@ public class LecturesController : ControllerBase
/// Фильтры: dateFrom, dateTo, courseId, teacherId, format (Online/Offline),
/// isOpen, tagId, search; параметры пагинации.
/// </param>
/// <remarks>Включает флаг `isEnrolled` — записан ли текущий пользователь на лекцию.</remarks>
/// <response code="200">Список лекций (пагинированный).</response>
/// <response code="401">Требуется аутентификация.</response>
[HttpGet]
[ProducesResponseType(typeof(PagedResult<LectureDto>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
public async Task<ActionResult> GetAll([FromQuery] LectureFilterRequest filter) =>
Ok(await _lectures.GetAllAsync(filter));
Ok(await _lectures.GetAllAsync(filter, CurrentUserId));
/// <summary>Получить детальную карточку лекции по ID.</summary>
/// <remarks>
+4 -1
View File
@@ -1140,7 +1140,7 @@
"Lectures"
],
"summary": "Получить каталог лекций с фильтрацией и пагинацией.",
"description": "**Required:** any authenticated user",
"description": "Включает флаг `isEnrolled` — записан ли текущий пользователь на лекцию.\n\n**Required:** any authenticated user",
"parameters": [
{
"name": "DateFrom",
@@ -4745,6 +4745,9 @@
"createdAt": {
"type": "string",
"format": "date-time"
},
"isEnrolled": {
"type": "boolean"
}
},
"additionalProperties": false