-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormTypingSystemsController.cs
More file actions
34 lines (30 loc) · 1.14 KB
/
Copy pathFormTypingSystemsController.cs
File metadata and controls
34 lines (30 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.AspNetCore.Mvc;
using WebImportX.DataLayer.Dtos;
using WebImportX.Interfaces.Services;
namespace WebImportX.Controllers
{
[ApiController]
[Route("systems")]
public class FormTypingSystemsController(IFormNamingSystemsService formTypingService) : ControllerBase
{
private readonly IFormNamingSystemsService _formTypingService = formTypingService;
[HttpGet("systems")]
public async Task<IActionResult> GetFormTypingSystems(string projectId)
{
var systems = await _formTypingService.GetProjectFormTypingSystemsAsync(projectId);
return Ok(systems);
}
[HttpGet("system-types")]
public async Task<IActionResult> GetFormTypingSystemTypes(string systemId)
{
var types = await _formTypingService.GetSystemFormTypesAsync(systemId);
return Ok(types);
}
[HttpPost("system")]
public async Task<IActionResult> CreateFormTypingSystem([FromBody] SetFormTypingSystemRequest request)
{
await _formTypingService.CreateFormTypingSystemAsync(request);
return Ok();
}
}
}