Skip to content

EVENTS: API inkludieren der URL von Anhängen #1873

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

Closed
5 of 6 tasks
mtnstar opened this issue Oct 5, 2022 · 0 comments · Fixed by #1879
Closed
5 of 6 tasks

EVENTS: API inkludieren der URL von Anhängen #1873

mtnstar opened this issue Oct 5, 2022 · 0 comments · Fixed by #1879

Comments

@mtnstar
Copy link
Contributor

mtnstar commented Oct 5, 2022

Der API Endpoint eines einzelnen Events soll neu die URL von Anhängen mitliefern.

"events": [
    {   
      "id": "42",
      "type": "events",
      "name": "Camp",
      "description": "Camp d'été",
      "motto": null,
      "cost": "270",
      "maximum_participants": 3,
      "participant_count": 3,
      "location": "1000 Lauanne",
      "application_opening_at": "2020-03-01",
      "application_closing_at": "2020-04-08",
      "application_conditions": null,
      "state": null,
      "teamer_count": 0,
      "external_application_link": "https://hitobito.example.com/de/groups/42/public_events/33",
      "attachments": [
         { "file_name": "test.png", 
            "url": "https://hitobito.example.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzcJBaHBFQT09IiwiZXhwxsLCJwdXIiOiJibG9iX2lkIn19--1fe9519b42bd2b94f7629b3ef5e176b5fb39f2d6/test.png"},
      ...],
      "links": {
        "dates": [
          "62"
        ],  
        "groups": [
          "32"
        ]   
      },  
      "tags": []
      ]
    }

Erstellt aus SBV Issue

Tech-Spec

ToDo

  • Serializer für Attachment erstellen
    • file_name, url als attribute ausgeben (keine id)
    • den active storage link von rails in der url ausgeben (inkl. fqdn und protokoll/https)
  • Event Serializer mit Attachments ergänzen für events#show.json
  • Sicherstellen das bei events#index keine Anhänge mitgeliefert werden
  • EventsController specs ergänzen
  • JSON im Browser testen
  • CHANGELOG-Eintrag unter "unreleased" unten hinzufügen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants