Skip to content

Add title and description to the attachment API type#10114

Merged
andreslucena merged 1 commit intodecidim:developfrom
mainio:feature/attachment-api-title-description
Nov 25, 2022
Merged

Add title and description to the attachment API type#10114
andreslucena merged 1 commit intodecidim:developfrom
mainio:feature/attachment-api-title-description

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

🎩 What? Why?

We recently needed to expose the title and description of an attachment to the API, so let's add them to the core as well?

Testing

  • Create attachments e.g. in a process
  • Query the attachments of that process through the API
  • See that the title and description are now in the API response

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

Tried it locally with

{
  participatoryProcess(slug: "PROCESS-SLUG") {
    attachments {
      url
      type
      thumbnail	
      title {
        translations {
          text
          locale
        }
      }
      description {
        translations {
          text
          locale
        }
      }
    }
  }
}

LGTM 👍🏽

@andreslucena andreslucena merged commit f62f57b into decidim:develop Nov 25, 2022
@ahukkanen ahukkanen deleted the feature/attachment-api-title-description branch November 25, 2022 10:21
entantoencuanto added a commit that referenced this pull request Nov 28, 2022
* develop:
  Redesign: verifications (#9759)
  Fix machine translations at the API (#9652)
  Add title and description to the attachment API type (#10114)
  Correct the "voted for this" string in the budgets component (#10113)
  Fix filter URL not updated with the text search input (#9618)
  Improve README design and contents (#10065)
  Update bulletin board to 0.24 for Ruby 3.1 compatibility (#9766)
  Fix some oversights in the release notes for the next release (#10078)
  Fix bug regarding user group moderation action logs (#10085)
  Fix wrong capitalization in i18n values and add missing keys (#10072)
  Enhance templates engine (#10015)
  Add slash in PR linter configuration (#10074)
  Allow blocking a UserGroup (#10021)
  Enable newsletters for admin on seeds (#10073)
entantoencuanto added a commit that referenced this pull request Nov 28, 2022
* develop:
  Redesign: verifications (#9759)
  Fix machine translations at the API (#9652)
  Add title and description to the attachment API type (#10114)
  Correct the "voted for this" string in the budgets component (#10113)
  Fix filter URL not updated with the text search input (#9618)
  Improve README design and contents (#10065)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants