commit
fb82476edc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,73 @@ |
|||||||
|
using AMAZONBackend.Repositorio.Clientes; |
||||||
|
using AMAZONBackend.Repositorio.Utils; |
||||||
|
using AMAZONBackend.Repositorio; |
||||||
|
using AMAZONBackend.Services.PDFGenerator.cs; |
||||||
|
using AMAZONBackend.Clientes.Amazon.Contracts; |
||||||
|
using AMAZONBackend.Context; |
||||||
|
using AMAZONBackend.Contracts.Clientes.CasaCuervo; |
||||||
|
using AMAZONBackend.Contracts.Utils; |
||||||
|
using AMAZONBackend.Contracts; |
||||||
|
using AMAZONBackend.Services.ValidarFraccion; |
||||||
|
using DinkToPdf; |
||||||
|
using DinkToPdf.Contracts; |
||||||
|
using AMAZONBackend.Clientes.Amazon.Repository; |
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args); |
||||||
|
|
||||||
|
// Add services to the container. |
||||||
|
|
||||||
|
builder.Services.AddControllers(); |
||||||
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle |
||||||
|
builder.Services.AddEndpointsApiExplorer(); |
||||||
|
builder.Services.AddSwaggerGen(); |
||||||
|
builder.Services.AddSingleton<DapperContext>(); |
||||||
|
builder.Services.AddSingleton(typeof(IConverter), new SynchronizedConverter(new PdfTools())); |
||||||
|
builder.Services.AddScoped<IUsuariosRepository, UsuariosRepository>(); |
||||||
|
builder.Services.AddScoped<IMenuRepository, MenuRepository>(); |
||||||
|
builder.Services.AddScoped<IPerfilesRepository, PerfilesRepository>(); |
||||||
|
|
||||||
|
//Clientes |
||||||
|
builder.Services.AddScoped<IAmazonRepository, AmazonRepository>(); |
||||||
|
builder.Services.AddScoped<ICasaCuervoRepository, CasaCuervoRepository>(); |
||||||
|
|
||||||
|
//Utilerias |
||||||
|
builder.Services.AddScoped<IFileManagerRepository, FileManagerRepository>(); |
||||||
|
builder.Services.AddScoped<IFilePaths4ProcessRepository, FilePaths4ProcessRepository>(); |
||||||
|
builder.Services.AddScoped<IPDFGenerator, PDFGenerator>(); |
||||||
|
builder.Services.AddScoped<IValidaFraccion, SrvValidaFraccion>(); |
||||||
|
|
||||||
|
|
||||||
|
//services cors |
||||||
|
builder.Services.AddCors(p => p.AddPolicy("corsapp", builder => |
||||||
|
{ |
||||||
|
//builder.WithOrigins("*").AllowAnyMethod().AllowAnyHeader(); |
||||||
|
|
||||||
|
builder.WithOrigins("http://localhost:3000", |
||||||
|
"http://localhost:5000", |
||||||
|
"https://localhost:5001", |
||||||
|
"http://localhost", |
||||||
|
"http://192.168.100.242:3000", |
||||||
|
"http://74.208.65.168", |
||||||
|
"http://reportes.gemcousa.com", |
||||||
|
"http://www.gemcousa.mx", |
||||||
|
"https://www.gemcousa.mx", |
||||||
|
"http://www.gemcousa.mx:443", |
||||||
|
"https://localhost:3001", |
||||||
|
"https://www.gemcousa.mx:443").AllowAnyMethod().AllowAnyHeader(); |
||||||
|
})); |
||||||
|
|
||||||
|
var app = builder.Build(); |
||||||
|
|
||||||
|
// Configure the HTTP request pipeline. |
||||||
|
if (app.Environment.IsDevelopment()) |
||||||
|
{ |
||||||
|
app.UseSwagger(); |
||||||
|
app.UseSwaggerUI(); |
||||||
|
} |
||||||
|
|
||||||
|
app.UseHttpsRedirection(); |
||||||
|
app.UseAuthentication(); |
||||||
|
app.UseCors("corsapp"); |
||||||
|
app.UseAuthorization(); |
||||||
|
app.MapControllers(); |
||||||
|
app.Run(); |
@ -0,0 +1,13 @@ |
|||||||
|
namespace AMAZONBackend |
||||||
|
{ |
||||||
|
public class WeatherForecast |
||||||
|
{ |
||||||
|
public DateTime Date { get; set; } |
||||||
|
|
||||||
|
public int TemperatureC { get; set; } |
||||||
|
|
||||||
|
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); |
||||||
|
|
||||||
|
public string? Summary { get; set; } |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
{ |
||||||
|
"Logging": { |
||||||
|
"LogLevel": { |
||||||
|
"Default": "Information", |
||||||
|
"Microsoft.AspNetCore": "Warning" |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
{ |
||||||
|
|
||||||
|
"ConnectionStrings": { |
||||||
|
"SqlConnection": "server=.; database=GEMCO; Integrated Security=true;TrustServerCertificate=True;" |
||||||
|
//initial catalog = sa;user=code; password=Chispa10 |
||||||
|
}, |
||||||
|
"Logging": { |
||||||
|
"LogLevel": { |
||||||
|
"Default": "Information", |
||||||
|
"Microsoft.AspNetCore": "Warning" |
||||||
|
} |
||||||
|
}, |
||||||
|
"AllowedHosts": "*", |
||||||
|
|
||||||
|
"Jwt": { |
||||||
|
"Key": "GFE1j5KLolZHDK9iKw5xK17Rz4ty7BlbXgnjPL6dNwVCCNQWU8uRGVyZmAZPWZMs4XX0phFMS849p25Lrwsn31Bi4J7GT2HQ9xeWlJLarJPDyoRZZvChpovwgrquQ9Pd", |
||||||
|
"Issuer": "JWTAuthenticationServer", |
||||||
|
"Audience": "JWTServicePostmanClient", |
||||||
|
"Subject": "JWTServiceAccessToken", |
||||||
|
"ExpirationHours": 4 |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,19 @@ |
|||||||
|
{ |
||||||
|
"runtimeOptions": { |
||||||
|
"tfm": "net6.0", |
||||||
|
"frameworks": [ |
||||||
|
{ |
||||||
|
"name": "Microsoft.NETCore.App", |
||||||
|
"version": "6.0.0" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Microsoft.AspNetCore.App", |
||||||
|
"version": "6.0.0" |
||||||
|
} |
||||||
|
], |
||||||
|
"configProperties": { |
||||||
|
"System.GC.Server": true, |
||||||
|
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue