Docker + Jenkfins File + v0.1
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user