feat: remove unused ref campus
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
using Asp.Versioning;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Mirea.Api.DataAccess.Application.Cqrs.Faculty.Queries.GetFacultyDetails;
|
||||
using Mirea.Api.DataAccess.Application.Cqrs.Faculty.Queries.GetFacultyList;
|
||||
using Mirea.Api.Dto.Responses;
|
||||
using Mirea.Api.Endpoint.Common.Attributes;
|
||||
@ -35,34 +34,8 @@ public class FacultyController(IMediator mediator) : BaseController
|
||||
.Select(f => new FacultyResponse()
|
||||
{
|
||||
Id = f.Id,
|
||||
Name = f.Name,
|
||||
CampusId = f.CampusId
|
||||
Name = f.Name
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets details of a specific faculty by ID.
|
||||
/// </summary>
|
||||
/// <param name="id">Faculty ID.</param>
|
||||
/// <returns>Details of the specified faculty.</returns>
|
||||
[HttpGet("{id:int}")]
|
||||
[BadRequestResponse]
|
||||
[NotFoundResponse]
|
||||
public async Task<ActionResult<FacultyDetailsResponse>> GetDetails(int id)
|
||||
{
|
||||
var result = await mediator.Send(new GetFacultyInfoQuery()
|
||||
{
|
||||
Id = id
|
||||
});
|
||||
|
||||
return Ok(new FacultyDetailsResponse()
|
||||
{
|
||||
Id = result.Id,
|
||||
Name = result.Name,
|
||||
CampusId = result.CampusId,
|
||||
CampusCode = result.CampusCode,
|
||||
CampusName = result.CampusName
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user