-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add debounce #210
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
…/ps_eventbus into feat/add-debounce
…/ps_eventbus into feat/add-debounce
src/Api/LiveSyncApiClient.php
Outdated
@@ -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 . '"}' |
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.
To avoid calling json_encode, a faster way would be a direct variable interpolation:
php
'{"shopContents": ["' . $shopContent . '"], ..............
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.
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 would mean shopContent is not of type string here?
No description provided.