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

Extract participant handlers to separate file #560

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

alex-yau-ttd
Copy link
Contributor

@alex-yau-ttd alex-yau-ttd commented Oct 29, 2024

Refactoring only :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Open to suggestions on the name of this file. The convention in this folder is participantsX, where X is another aspect related to participants, e.g. participantsKeyPairs.ts. However, these methods are purely to do with participants themselves.

const { participant } = req;
const apiRoles: ApiRoleDTO[] = await getApiRoles(participant!);
return res.status(200).json(apiRoles);
};
Copy link
Contributor

@ashleysmithTTD ashleysmithTTD Oct 29, 2024

Choose a reason for hiding this comment

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

if we keep the naming of participants which I think is fine, then I think it makes sense for this function to be moved into a new file called participantsApiRoles.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@alex-yau-ttd alex-yau-ttd merged commit 6deda36 into main Oct 29, 2024
3 checks passed
@alex-yau-ttd alex-yau-ttd deleted the ajy-UID2-3640-Extract-participant-handlers branch October 29, 2024 23:51
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.

2 participants