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

RDISCROWD 5743 task browse bookmarks #832

Merged
merged 16 commits into from
Mar 29, 2023
Merged

Conversation

n00rsy
Copy link

@n00rsy n00rsy commented Mar 24, 2023

Issue number of the reported bug or feature request: RDISCROWD-5743

Describe your changes
Add new API methods:

  1. GET /<user_name>/taskbrowse_bookmarks/<short_name>: get a list of the user's bookmarks for the specified user and project.
    Response JSON:
    { name1: url1, name2: url2...}

  2. POST /<user_name>/taskbrowse_bookmarks/<short_name>: add a new bookmark for the specified user and project.
    Request JSON:
    {name: <new bookmark name>, url: <new bookmark url>}
    Response JSON: new list of bookmarks
    { name1: url1, name2: url2...}

  3. DELETE /<user_name>/taskbrowse_bookmarks/<short_name>: delete the specified bookmark by name
    Request JSON:
    {name: <bookmark to delete>}
    Response JSON: new list of bookmarks
    { name1: url1, name2: url2...}

Bookmarks are stored in user data (in postgres db) in the following format:

user.info = { 
             metadata...,
             taskbrowse_bookmarks : {
	                            project_name : {
			                         bookmark_name : url,
                                                 bookmark_name : url,
                                                 bookmark_name : url
                                                 ....
		                    },
	                            project_name : {
			                         bookmark_name : url,
                                                 bookmark_name : url,
                                                 bookmark_name : url
                                                 ....
		                    }
                                    ...
                  }
}

Testing performed
Tested locally

@coveralls
Copy link

coveralls commented Mar 24, 2023

Pull Request Test Coverage Report for Build 4555766290

  • 70 of 70 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 94.094%

Totals Coverage Status
Change from base Build 4545768309: 0.02%
Covered Lines: 16809
Relevant Lines: 17864

💛 - Coveralls

@n00rsy n00rsy requested a review from dchhabda March 27, 2023 13:23
pybossa/view/account.py Outdated Show resolved Hide resolved
pybossa/view/account.py Outdated Show resolved Hide resolved
pybossa/view/account.py Outdated Show resolved Hide resolved
@n00rsy n00rsy requested a review from dchhabda March 27, 2023 19:16
pybossa/view/account.py Outdated Show resolved Hide resolved
@n00rsy n00rsy force-pushed the RDISCROWD-5743-task-browse-bookmarks branch from b4b0109 to 90aa8bb Compare March 29, 2023 14:31
@n00rsy n00rsy closed this Mar 29, 2023
@n00rsy n00rsy reopened this Mar 29, 2023
Copy link

@dchhabda dchhabda left a comment

Choose a reason for hiding this comment

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

lgtm. can be merged upon tests/coverage pass. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants