Skip to content
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

CSP-1392: POST Permissions Endpoint #25

Merged
merged 17 commits into from
Jun 21, 2024

Conversation

shaun-downey-education
Copy link
Contributor

  • Added a new endpoint to the PermissionsController.cs file to manage the adding a updating of provider permissions.

Comment on lines +7 to +9
Task<AccountLegalEntity?> GetAccountLegalEntity(long accountLegalEntityId, CancellationToken cancellationToken);
Task<List<AccountLegalEntity>> GetAccountLegalEntities(long accountId, CancellationToken cancellationToken);
Task<bool> AccountLegalEntityExists(long accountLegalEntityId, CancellationToken cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essentially GetAccountLegalEntity and AccountLegalEntityExists are the same, a null check can be done instead of two separate methods


public interface IPermissionsAuditWriteRepository
{
Task RecordPermissionsAudit(PermissionsAudit permissionsAudit, CancellationToken cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create instead of Record, we need to be consistent in this naming convention

{
public async Task RecordPermissionsAudit(PermissionsAudit permissionsAudit, CancellationToken cancellationToken)
{
await providerRelationshipsDataContext.PermissionsAudit.AddAsync(permissionsAudit, cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again AddAsync is not needed here, this will result in additional thread for no benefit.

Copy link

sonarcloud bot commented Jun 19, 2024

@shaun-downey-education shaun-downey-education merged commit cf23603 into main Jun 21, 2024
6 checks passed
@shaun-downey-education shaun-downey-education deleted the CSP-1392-post-permissions-endpoint-merge branch June 21, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants