-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get system register dto fix not visible #939
base: main
Are you sure you want to change the base?
Conversation
Quality Gate failedFailed conditions |
@@ -91,6 +96,13 @@ public async Task<ActionResult<RequestSystemResponse>> CreateRequest([FromBody] | |||
SystemId = createRequest.SystemId, | |||
}; | |||
|
|||
SystemUser? existing = await _systemUserRepository.GetSystemUserByExternalRequestId(externalRequestId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we calling the repository directly? we usually route via the service
@@ -91,6 +96,13 @@ public async Task<ActionResult<RequestSystemResponse>> CreateRequest([FromBody] | |||
SystemId = createRequest.SystemId, | |||
}; | |||
|
|||
SystemUser? existing = await _systemUserRepository.GetSystemUserByExternalRequestId(externalRequestId); | |||
if (existing is not null) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we follow a different error pattern in other controllers if i remember
@@ -68,7 +73,7 @@ public async Task<ActionResult<RegisteredSystemDTO>> GetRegisteredSystemDto(stri | |||
{ | |||
RegisteredSystem registeredSystem = await _systemRegisterService.GetRegisteredSystemInfo(systemId, cancellationToken); | |||
|
|||
if (registeredSystem == null) | |||
if (registeredSystem == null || !registeredSystem.IsVisible) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will break the bff and frontend? For vendorrequest and change request, in GET, the request only contains the systemId. The bff uses this service (authentication/api/v1/systemregister/{systemId}) to load the system (for displaying orgno, vendorname, systemname).
An alternative solution for this is for backend to include the system object in GET vendorrequest and change request
Description
Related Issue(s)
Verification
Documentation