-
Notifications
You must be signed in to change notification settings - Fork 21
Issue 180 Adding contact-direct check-in #181
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
Conversation
This provides a variety of bug fixes as defined by the resolved tickets. Primarily this PR will add contact-direct check-in capabilities. This allows Authorized contacts to check-in entities direclty without a user account by using an auth token. resolves #131 resolves #132 resolves #102 resolves #162 resolves #173 resolves #145 resolves #158 resolves #180
|
|
||
| EntityContact.findByEntityId = async (entityId) => { | ||
| const entries = await EntityContact.findAll({ | ||
| where: {entityId} |
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.
Does this automatically find it by pk?
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.
It does not for some reason. Not sure what was off about that but it wasn't really worth debugging. When I used findByPk nothing came back.
| /** @todo allow for passing entity and contact arrays */ | ||
| const { entityIds, contactIds, relationshipTitle } = req.body; | ||
|
|
||
| if (entityIds === undefined && contactIds === undefined) { |
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.
It looks like this is only running if entityIds and contactIds is undefined. If that's the case. are they needed in the request body?
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.
That's for future planning. Eventually, we're going to allow for passing an array of either or both types of ID's to only send emails to those associations. For now, though, that functionality isn't in there.
src/routes/user.js
Outdated
| let message; | ||
| try { | ||
| if (validator.isEmail(req.body.email)) { | ||
| console.log(req.body.password) |
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.
Is this safe to keep?
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.
no that probably needs to go 😎
|
@allcontributors add @c-w-allen for review |
|
@revjtanton I've put up a pull request to add @c-w-allen! 🎉 |
|
@allcontributors add @msmith125 for review |
|
@revjtanton I've put up a pull request to add @msmith125! 🎉 |
This provides a variety of bug fixes as defined by the resolved tickets.
Primarily this PR will add contact-direct check-in capabilities. This allows
Authorized contacts to check-in entities directly without a user account by using an
auth token.
resolves #131
resolves #132
resolves #102
resolves #162
resolves #173
resolves #145
resolves #158
resolves #180
Todos
Deploy Notes
There is a new endpoint defined in Swagger that will allow for emails to be sent to contacts. Sending that email blast is touchy. To test you must set an
.envvar for: -URL=http://localhost:8080anTEST_EMAIL=yourmail@codeforbaltimore.orgThen you must make sure at least one contact email in the system is equal to your test email set above.