Docker + Jenkfins File + v0.1

This commit is contained in:
Marco Santos
2024-11-18 10:42:44 +00:00
parent 964bad93f1
commit 048d3ea82f
32 changed files with 505 additions and 975 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using GeradoresService;
using GeradoresService.DAL;
namespace GeradoresWS.Controllers
{
@@ -7,8 +8,13 @@ namespace GeradoresWS.Controllers
[Route("[controller]")]
public class GenerateController : Controller
{
GeradoresContext _context;
public GenerateController(GeradoresContext context)
{
_context = context;
}
#region NIF
[HttpGet("GetNIFTypes")]
public List<NIF.NIFType> GetNIFTypes()
{
@@ -18,13 +24,15 @@ namespace GeradoresWS.Controllers
[HttpGet("GenerateNIF")]
public string GenerateNIF(string? type)
{
return NIF.Generate(type);
var nif = new NIF(_context);
return nif.Generate(type);
}
[HttpGet("ValidateNIF")]
public bool ValidateNIF(string nif)
{
return NIF.Validate(nif);
var teste = new NIF(_context);
return teste.Validate(nif);
}
#endregion