Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

feat: refactor favorite items #656

Merged
merged 4 commits into from
Jun 21, 2023
Merged

feat: refactor favorite items #656

merged 4 commits into from
Jun 21, 2023

Conversation

morganridel
Copy link
Contributor

No description provided.

Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

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

LGTM! I've left minor comments ⭐

cy.intercept(
{
method: HttpMethod.POST,
url: new RegExp(`${API_HOST}/${GET_FAVORITE_ITEMS_ROUTE}/${ID_FORMAT}`),
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't have to be changes, but if possible you can use the API endpoints from query-client, so it doesn't break if we change the endpoint route.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that the endpoint builder takes a UUID to build the url, and the ID_FORMAT is a string

cy.intercept(
{
method: HttpMethod.DELETE,
url: new RegExp(`${API_HOST}/${GET_FAVORITE_ITEMS_ROUTE}/${ID_FORMAT}`),
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

package.json Outdated
@@ -147,7 +147,8 @@
"nth-check": "2.1.1",
"react-error-overlay": "6.0.11",
"@types/react": "17.0.62",
"@svgr/webpack": "6.5.1"
"@svgr/webpack": "6.5.1",
"@graasp/sdk": "github:graasp/graasp-sdk#refactor-favorite"
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to change your branches ;)

@morganridel morganridel requested a review from pyphilia June 20, 2023 14:59
@morganridel morganridel merged commit 589f2f6 into main Jun 21, 2023
@morganridel morganridel deleted the refactor-favorite branch June 21, 2023 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants