public Task <LessonDetailsResponse> CreateAsync(LessonCreateCommand.LessonCreateCommandBody command, CancellationToken cancellationToken = default) { return(flurlClient.Request(baseUrl) .PostJsonAsync(command, cancellationToken) .ReceiveJson <LessonDetailsResponse>()); }
public Task <LessonDetailsResponse> CreateLesson( Guid schoolYearId, Guid classId, Guid subjectId, [FromBody] LessonCreateCommand.LessonCreateCommandBody body, CancellationToken cancellationToken) { return(mediator.Send(new LessonCreateCommand { ClassId = classId, SchoolYearId = schoolYearId, SubjectId = subjectId, Body = body }, cancellationToken)); }