Align .editorconfig files
When debugging only app.Services.GetRequiredService<IPCRBService>(); Injected AppSettings instead of using GetEnvironmentVariable at Services level Get ready to use VSCode IDE
This commit is contained in:
@ -398,4 +398,4 @@ public class ApprovalController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ public class AuthenticationController : ControllerBase {
|
||||
IAuthenticationService authenticationService) {
|
||||
_logger = logger ?? throw new ArgumentNullException("ILogger not injected");
|
||||
_monInClient = monInClient ?? throw new ArgumentNullException("IMonInWorkerClient not injected");
|
||||
_authenticationService = authenticationService ??
|
||||
_authenticationService = authenticationService ??
|
||||
throw new ArgumentNullException("IAuthenticationService not injected");
|
||||
}
|
||||
|
||||
@ -175,4 +175,4 @@ public class AuthenticationController : ControllerBase {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -53,4 +53,4 @@ public class CAController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -54,4 +54,4 @@ public class CustomerController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -53,4 +53,4 @@ public class ECNController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using MesaFabApproval.API.Services;
|
||||
using MesaFabApproval.Models;
|
||||
using MesaFabApproval.Shared.Models;
|
||||
using MesaFabApproval.Shared.Services;
|
||||
|
||||
@ -17,12 +18,14 @@ public class MRBController : ControllerBase {
|
||||
|
||||
private readonly string _mrbAttachmentPath;
|
||||
|
||||
public MRBController(ILogger<MRBController> logger, IMRBService mrbService, IMonInWorkerClient monInClient) {
|
||||
public MRBController(ILogger<MRBController> logger,
|
||||
IMRBService mrbService,
|
||||
IMonInWorkerClient monInClient,
|
||||
AppSettings appSettings) {
|
||||
_logger = logger ?? throw new ArgumentNullException("ILogger not injected");
|
||||
_mrbService = mrbService ?? throw new ArgumentNullException("IMRBService not injected");
|
||||
_monInClient = monInClient ?? throw new ArgumentNullException("IMonInWorkerClient not injected");
|
||||
_mrbAttachmentPath = Environment.GetEnvironmentVariable("FabApprovalMrbAttachmentPath") ??
|
||||
throw new ArgumentNullException("FabApprovalMrbAttachmentPath environment variable not found");
|
||||
_mrbAttachmentPath = appSettings.MrbAttachmentPath;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -523,7 +526,7 @@ public class MRBController : ControllerBase {
|
||||
|
||||
if (mrbNumber <= 0) throw new ArgumentException($"{mrbNumber} is not a valid MRB#");
|
||||
|
||||
List<MRBActionAttachment> attachments =
|
||||
List<MRBActionAttachment> attachments =
|
||||
(await _mrbService.GetAllActionAttachmentsForMRB(mrbNumber, bypassCache)).ToList();
|
||||
|
||||
return Ok(attachments);
|
||||
@ -969,4 +972,4 @@ public class MRBController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1123,4 +1123,4 @@ public class PCRBController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -220,4 +220,4 @@ public class UserController : ControllerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user