39 lines
829 B
C#
39 lines
829 B
C#
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
|
|
}
|
|
}
|