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

Support for user favorites. #402

Merged
merged 35 commits into from
Feb 6, 2025
Merged

Conversation

axl8713
Copy link
Collaborator

@axl8713 axl8713 commented Jan 29, 2025

This PR should be merged after #382!

Changes as per #383:

  • Added association operations for Users favorites under the /users context:

    • add favorite resource: POST /geostore/rest/users/user/{id}/favorite/{resourceId}
    • remove favorite resource: DELETE /geostore/rest/users/user/{id}/favorite/{resourceId}
  • Added support to showing favorite status for the resources in ExtJS get all result:

    • request: GET /geostore/rest/extjs/search/list
    • response:
    {
      "ExtResourceList": {
        "ResourceCount": 3,
        "Resource": [
          {
            "advertised": false,
            "category": {
              "id": 1,
              "name": "cat1"
            },
            "creation": "2025-01-17T19:04:03.379+00:00",
            "creator": "Y",
            "editor": "editore",
            "id": 101,
            "name": "user owned readonly",
            "canEdit": true,
            "canDelete": true,
            "canCopy": true
            "isFavorite": true
          },
         [...]
  • Added support to showing favorite status for the single resource in ExtJS:

    • request: GET /geostore/rest/extjs/resource/100
    • response:
    <ShortResource>
        <advertised>true</advertised>
        <canDelete>true</canDelete>
        <canEdit>true</canEdit>
        <creation>2025-01-17T19:04:03.379+00:00</creation>
        <creator>X</creator>
        <editor>editore</editor>
        <id>100</id>
        <name>uno</name>
        <attributeList/>
        <securityRuleList/>
        <tagList/>
        <isFavorite>true</isFavorite>
    </ShortResource>

Other changes:

  • Added filtering support for user favorite resources in ExtJS get all operation:
    • request: GET /geostore/rest/extjs/search/list?favoritesOnly=true

Closes #383

@axl8713 axl8713 self-assigned this Jan 29, 2025
@axl8713 axl8713 requested a review from afabiani January 30, 2025 08:59
@axl8713
Copy link
Collaborator Author

axl8713 commented Jan 30, 2025

Will update API wiki after the approval.

@afabiani afabiani marked this pull request as draft January 30, 2025 09:06
@allyoucanmap allyoucanmap marked this pull request as ready for review February 6, 2025 09:47
@afabiani afabiani merged commit 257d342 into geosolutions-it:master Feb 6, 2025
2 checks passed
@axl8713 axl8713 deleted the geostore-383 branch February 7, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for user favorites
2 participants