Gerações NIF NISS
This commit is contained in:
38
GeradoresWS/Controllers/GenerateController.cs
Normal file
38
GeradoresWS/Controllers/GenerateController.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using GeradoresService;
|
||||
|
||||
namespace GeradoresWS.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class GenerateController : Controller
|
||||
{
|
||||
#region NIF
|
||||
[HttpGet("GenerateNIF")]
|
||||
public string GenerateNIF(string? type)
|
||||
{
|
||||
return NIF.Generate(type);
|
||||
}
|
||||
|
||||
[HttpGet("ValidateNIF")]
|
||||
public bool ValidateNIF(string nif)
|
||||
{
|
||||
return NIF.Validate(nif);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region NISS
|
||||
[HttpGet("GenerateNISS")]
|
||||
public string GenerateNISS()
|
||||
{
|
||||
return NISS.Generate();
|
||||
}
|
||||
|
||||
[HttpGet("ValidateNISS")]
|
||||
public bool ValidateNISS(string nif)
|
||||
{
|
||||
return NISS.Validate(nif);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user