Conversation
Contributor
|
This may have been obviated by #1489 🙂 |
Contributor
Author
|
Haha, yes, most is obviated. But a few last changes are left. |
ace-n
suggested changes
Sep 26, 2019
| // Return a formatted message | ||
| resolve(formatSlackMessage(query, response)); | ||
| const makeSearchRequest = async query => { | ||
| await kgsearch.entities.search( |
Contributor
There was a problem hiding this comment.
- Do we know if this actually returns a promise? (either via running it ourselves, or reviewing Slack's docs)
- If so, we should get rid of the callback below. 🙂
| console.error(err); | ||
| res.status(err.code || 500).send(err); | ||
| return Promise.reject(err); | ||
| throw err; |
Contributor
There was a problem hiding this comment.
Nit (perhaps better addressed in a different PR): redundant?
| `SingerId: ${row.SingerId}, ` + | ||
| `AlbumId: ${row.AlbumId}, ` + | ||
| `AlbumTitle: ${row.AlbumTitle}\n` | ||
| `SingerId: ${row.SingerId}, AlbumId: ${row.AlbumId}, AlbumTitle: ${row.AlbumTitle}\n` |
| doc.data().expireTime | ||
| ); | ||
| return doc.data(); | ||
| await doc.data(); |
Contributor
There was a problem hiding this comment.
This seems confusing - why are we using doc.data() presumably before we've awaited it? (If we know this case definitely won't happen, we should at least leave a comment explaining that.)
Contributor
There was a problem hiding this comment.
After push notification we just want to return from the function. The client will receive the token in the form of push notification. I don't think await is required here.
This was referenced Jun 19, 2022
This was referenced Jun 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drive-by fix: Run linter for template strings.