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

Update RestDefinitions.php with location #468

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/swagger/calendar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,9 @@ definitions:
max_participants:
type: string
example: null
location:
type: string
example: null
content:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/definitions/Content"

Expand Down
3 changes: 2 additions & 1 deletion helpers/RestDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static function getCalendarEntry(CalendarEntry $entry)
'participant_info' => $entry->participant_info,
'closed' => (int)$entry->closed,
'max_participants' => (int)$entry->max_participants,
'location' => $entry->location,
'content' => ContentDefinitions::getContent($entry->content),
'participants' => static::getParticipantUsers($entry->getParticipantEntries()->with('user')->all())
];
Expand All @@ -60,4 +61,4 @@ private static function getParticipantUsers($participants)

return $result;
}
}
}