fix: return altName
This commit is contained in:
parent
4605c81895
commit
84d7b095f0
@ -11,12 +11,13 @@ public class GetProfessorInfoQueryHandler(IProfessorDbContext dbContext) : IRequ
|
|||||||
{
|
{
|
||||||
public async Task<ProfessorInfoVm> Handle(GetProfessorInfoQuery request, CancellationToken cancellationToken)
|
public async Task<ProfessorInfoVm> Handle(GetProfessorInfoQuery request, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var discipline = await dbContext.Professors.FirstOrDefaultAsync(p => p.Id == request.Id, cancellationToken) ?? throw new NotFoundException(typeof(Domain.Schedule.Professor), request.Id);
|
var professor = await dbContext.Professors.FirstOrDefaultAsync(p => p.Id == request.Id, cancellationToken) ?? throw new NotFoundException(typeof(Domain.Schedule.Professor), request.Id);
|
||||||
|
|
||||||
return new ProfessorInfoVm()
|
return new ProfessorInfoVm()
|
||||||
{
|
{
|
||||||
Id = discipline.Id,
|
Id = professor.Id,
|
||||||
Name = discipline.Name,
|
Name = professor.Name,
|
||||||
|
AltName = professor.AltName
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user