| 12345678910111213141516171819202122232425 |
- namespace Diligent.WebAPI.Host.Controllers.V1
- {
- [ApiVersion("1.0")]
- [Route("v{version:apiVersion}/technologies")]
- [ApiController]
- public class TechnologiesController : ControllerBase
- {
- private readonly ITechnologyService _technologyService;
-
- public TechnologiesController(ITechnologyService technologyService)
- {
- _technologyService = technologyService;
- }
-
- [Authorize]
- [HttpGet]
- public async Task<IActionResult> GetAll() =>
- Ok(await _technologyService.GetAllAsync());
-
- [Authorize]
- [HttpGet("{id}")]
- public async Task<IActionResult> GetById([FromRoute] int id) =>
- Ok(await _technologyService.GetByIdAsync(id));
- }
- }
|