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

feat: add debounce #210

Merged
merged 19 commits into from
Jan 4, 2024
Merged

feat: add debounce #210

merged 19 commits into from
Jan 4, 2024

Conversation

fox-john
Copy link
Contributor

No description provided.

@fox-john fox-john added the 🥕 Radis to review Ready to reviewed by 1 peer label Nov 29, 2023
@fox-john fox-john requested a review from jokesterfr November 29, 2023 16:08
@fox-john fox-john self-assigned this Nov 29, 2023
@jokesterfr

This comment was marked as resolved.

@fox-john fox-john added 🚧 WIP Status: Work In Progress and removed 🥕 Radis to review Ready to reviewed by 1 peer labels Nov 30, 2023
@fox-john fox-john added 🥕 Radis to review Ready to reviewed by 1 peer and removed 🚧 WIP Status: Work In Progress labels Nov 30, 2023
@@ -83,7 +83,7 @@ public function liveSync($shopContents, $shopContentId, $action)
'User-Agent' => 'ps-eventbus/' . $this->module->version,
'Content-Type' => 'application/json',
],
'{"shopContents":' . json_encode($shopContents) . ', "shopContentId": ' . $shopContentId . ', "action": "' . $action . '"}'
'{"shopContents":' . json_encode($shopContent) . ', "shopContentId": ' . $shopContentId . ', "action": "' . $action . '"}'
Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid calling json_encode, a faster way would be a direct variable interpolation:

php
'{"shopContents": ["' . $shopContent . '"], ..............

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
I have this error when i try.

Copy link
Contributor

Choose a reason for hiding this comment

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

That would mean shopContent is not of type string here?

@fox-john fox-john requested a review from jokesterfr January 3, 2024 09:16
@fox-john fox-john merged commit b2cbf52 into main Jan 4, 2024
12 checks passed
@fox-john fox-john deleted the feat/add-debounce branch January 4, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🥕 Radis to review Ready to reviewed by 1 peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants