This PR adds a new function fetchBookmarks to extension/script.js that sends a GET request to the /bookmarks endpoint. The function handles the returned JSON data to add or remove bookmarks as needed.
Summary of Changes
Added a new function fetchBookmarks to extension/script.js that sends a GET request to the /bookmarks endpoint.
Handled the returned JSON data in the fetchBookmarks function to add or remove bookmarks based on the server data.
Updated the fetchBookmarks function to iterate over the returned bookmarks and update the local bookmarks accordingly.
Ensured that the function follows the same structure and conventions as the existing fetch requests in extension/script.js.
Tested the changes to ensure the new function works as expected.
Please review and merge this PR. Thank you!
Fixes #7.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/fetch-bookmarks
🎉 Latest improvements to Sweep:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds a new function
fetchBookmarks
toextension/script.js
that sends a GET request to the/bookmarks
endpoint. The function handles the returned JSON data to add or remove bookmarks as needed.Summary of Changes
fetchBookmarks
toextension/script.js
that sends a GET request to the/bookmarks
endpoint.fetchBookmarks
function to add or remove bookmarks based on the server data.fetchBookmarks
function to iterate over the returned bookmarks and update the local bookmarks accordingly.fetch
requests inextension/script.js
.Please review and merge this PR. Thank you!
Fixes #7.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: