Skip to content

Commit

Permalink
Add 'after' param to /discourse-post-event/events.json call
Browse files Browse the repository at this point in the history
  • Loading branch information
ledadu committed Dec 26, 2021
1 parent 7f9b61b commit 3ea9fb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion javascripts/discourse/initializers/layouts-event-list.js.es6
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export default {

if (layoutsError || !siteSettings.calendar_enabled) return;

ajax(`/discourse-post-event/events.json`).then((eventList) => {
const now = new Date();
ajax(
`/discourse-post-event/events.json?after=${now.toISOString()}`
).then((eventList) => {
const events = eventList.events;
const props = {
events,
Expand Down

0 comments on commit 3ea9fb0

Please sign in to comment.