Skip to content

Commit

Permalink
Merge pull request #468 from Artillio/master
Browse files Browse the repository at this point in the history
Update RestDefinitions.php with location
  • Loading branch information
luke- authored Mar 14, 2024
2 parents 6a07907 + fab51fd commit 63042e0
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/swagger/calendar.yaml
Original file line number Diff line number Diff line change
@@ -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"

3 changes: 2 additions & 1 deletion helpers/RestDefinitions.php
Original file line number Diff line number Diff line change
@@ -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())
];
@@ -60,4 +61,4 @@ private static function getParticipantUsers($participants)

return $result;
}
}
}

0 comments on commit 63042e0

Please sign in to comment.