Code-complete v2 vehicle API

This commit is contained in:
2020-07-26 21:52:36 -04:00
parent 48dc190027
commit f2ca3419b0
28 changed files with 1292 additions and 1001 deletions

View File

@@ -24,11 +24,13 @@ namespace PartSource.Api
services.AddMvc(options =>
{
options.OutputFormatters.Add(new LiquidTemplateOutputFormatter());
options.EnableEndpointRouting = false;
});
services.AddTransient<PartService>();
services.AddTransient<NexpartService>();
services.AddTransient<SecurityService>();
services.AddTransient<VehicleService>();
services.AddCors(o => o.AddPolicy("Default", builder =>
{
@@ -45,10 +47,10 @@ namespace PartSource.Api
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
//if (env.IsDevelopment())
//{
// app.UseDeveloperExceptionPage();
//}
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
//else
//{
// app.UseHsts();
@@ -56,7 +58,7 @@ namespace PartSource.Api
app.UseCors("Default");
app.UseExceptionHandler("/Error");
// app.UseExceptionHandler("/Error");
// app.UseHttpsRedirection();
app.UseMvc();
}