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

added 'await' in front of eventrepository call #356

Merged
merged 7 commits into from
Nov 8, 2023

Conversation

yimmyj
Copy link
Contributor

@yimmyj yimmyj commented Jun 8, 2023

I changed the "create" function for creating an event in EventService.ts. I added "await" before the method isUnusedAttendanceCode. Prior to my change, isUnusedAttendanceCode would be a promise instead of the actual boolean value (false), and the if condition for throwing the human-readable error could never be reached.
Closes #352.
Screen Shot 2023-06-07 at 7 56 16 PM

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Thanks for contributing! If you've made changes to the API's functionality, please make sure to bump the package version—see this guide to semantic versioning for details—and document those changes as appropriate.

yarn.lock Outdated
Copy link
Member

Choose a reason for hiding this comment

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

You can do

$ git checkout origin/main -- yarn.lock

to revert changes to this file by checking out the original version from the main branch

Copy link
Contributor

Choose a reason for hiding this comment

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

cool hack mate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fascinating.

@shravanhariharan2
Copy link
Collaborator

Why are we gitignoring yarn.lock in this PR? I think we should keep it in because it defines the exact versions that all are our dependencies should be at that we know are guaranteed to work. If we remove it, then yarn in CI will create its own Lockfile from the package.json versions that may generate different versions from expected. For example, @sendgrid/mail here is defined as ^7.4.4, which means that any version that is 7.x.x is acceptable. For the current yarn.lock committed to master, that version is 7.6.1, but removing the yarn.lock and having it regenerated might produce a different version that could introduce bugs or breaking changes.

Ideally we pin all of our dependencies' versions at versions that we know are working, but as you might be able to imagine that is a pretty tedious process. So our remedy in the meanwhile is to persist the Lockfile to ensure versions across deploys stay consistent

Copy link
Contributor

@dowhep dowhep left a comment

Choose a reason for hiding this comment

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

LFTM 🚀

@yimmyj yimmyj merged commit 89426fc into master Nov 8, 2023
2 checks passed
@nik-dange nik-dange deleted the Jimmy/fix-event-create-error-message branch February 29, 2024 21:18
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.

Check In Code Already Exists API Error Message
4 participants