Code-complete v2 vehicle API
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user