forked from ddrilling/AsbCloudServer
Added WellCompositeService in DependencyInjection
This commit is contained in:
parent
8e447a040f
commit
aa977e4db5
@ -40,6 +40,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<IWellOperationService, WellOperationService>();
|
||||
services.AddTransient<IWellOperationsStatService, WellOperationsStatService>();
|
||||
services.AddTransient<IWellOperationImportService, WellOperationImportService>();
|
||||
services.AddTransient<IWellCompositeService, WellCompositeService>();
|
||||
services.AddTransient<IMeasureService, MeasureService>();
|
||||
services.AddTransient<IDrillingProgramService, DrillingProgramService>();
|
||||
services.AddTransient<IDrillingProgramApacheService, DrillingProgramApacheService>();
|
||||
|
@ -13,12 +13,12 @@ namespace AsbCloudWebApi.Controllers
|
||||
[Authorize]
|
||||
public class WellCompositeController : ControllerBase
|
||||
{
|
||||
private readonly IWellCompositeService service;
|
||||
private readonly IWellCompositeService wellCompositeService;
|
||||
private readonly IWellService wellService;
|
||||
|
||||
public WellCompositeController(IWellCompositeService service, IWellService wellService)
|
||||
public WellCompositeController(IWellCompositeService wellCompositeService, IWellService wellService)
|
||||
{
|
||||
this.service = service;
|
||||
this.wellCompositeService = wellCompositeService;
|
||||
this.wellService = wellService;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||
return Forbid();
|
||||
|
||||
var result = await service.GetAsync(idWell, token).ConfigureAwait(false);
|
||||
var result = await wellCompositeService.GetAsync(idWell, token).ConfigureAwait(false);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||
return Forbid();
|
||||
|
||||
var result = await service.SaveAsync(idWell, wellComposites, token).ConfigureAwait(false);
|
||||
var result = await wellCompositeService.SaveAsync(idWell, wellComposites, token).ConfigureAwait(false);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user