-
-
Notifications
You must be signed in to change notification settings - Fork 310
Updated syntax in utils.js with async/await #1146
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
base: master
Are you sure you want to change the base?
Conversation
Update utils.js with async/await syntax
|
@MonkeyDo Thanks for your help and guidance, and now my first PR is successfully awaiting approval to be merged. Once again, thank you! |
|
@MonkeyDo i request you to have a look at my pr for any further corrections if needed. |
MonkeyDo
left a comment
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.
Sorry for the long delay!
Thanks for rewriting this file, works like a charm! 🚀
I took the liberty of adding back the documentation for the allowOnlyGetMethod function, which I assumed were deleted by mistake.
Expecting the wrong key name in tests
|
I had to dig a little bit to figure out why the tests were failing. You fixed an error with the expected key name ("relationship" vs. "relationships") here and the test was expecting the incorrect key and needed to be fixed. |
relationship vs relationships
|
@moksha-hub for ease of work, you can run the linting on your local machine and avoid the back-and-forth, with the command |
|
I sincerely apologize for the multiple attempts. I appreciate your patience and understanding. Can you please check it now? Thank you for your time! |
|
No worries about the commits, I will squash it all into one commit when merging. It was more to simplify your own workflow :) |
MonkeyDo
left a comment
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.
Just a couple of minor details, some just linting warnings (not even errors).
After that, clear for merging ! :)
| }, []); | ||
| } | ||
| catch (error) { | ||
| const errorMessage = 'Failed to fetch browsed relationships'; |
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 could be helpful to have the full error message here for debugging purposes:
| const errorMessage = 'Failed to fetch browsed relationships'; | |
| const errorMessage = `Failed to fetch browsed relationships: ${error.toString()}`; |
|
|
||
|
|
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.
These two lines shouldn't be removed, it created an ESLint warning
"Expected 2 empty lines after import statement not followed by another import (import/newline-after-import)"
| export const identifiersRelations = ['identifierSet.identifiers.type']; | ||
| export const relationshipsRelations = ['relationshipSet.relationships.type']; | ||
|
|
||
| export const relationshipsRelations = ['relationshipSet.relationships.type']; // Fixed from 'relationship' to 'relationships' |
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.
I don't think the comment is required here, unless I missed something.
As it is creating an ESLint warning, let's remove it.
| export const relationshipsRelations = ['relationshipSet.relationships.type']; // Fixed from 'relationship' to 'relationships' | |
| export const relationshipsRelations = ['relationshipSet.relationships.type']; |
Expecting an array under relationships with an s, not relationship singular
|
See I messed up with fixing the test suite as well :) |
rename relationship to relationships, and make it an array as expected.
Problem
Ticket No: #[BB-797]