From f369cbb7d3abcbb844ceea67fb5bf3370080c92b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 25 May 2019 11:39:00 +0100 Subject: [PATCH] Only get accepted sessions --- src/App.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 679f1aa..c9daa5a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@

Sessions

-
+
  • {{ session.attributes.title }} @@ -22,6 +22,7 @@ const axios = require('axios') module.exports = { data () { return { + loaded: false, sessions: [] } }, @@ -29,8 +30,11 @@ module.exports = { created () { const baseUrl = 'http://drupaltestcamp.docksal' - axios.get(`${baseUrl}/jsonapi/node/session`) + axios.get(`${baseUrl}/jsonapi/node/session`, { params: { + 'filter[field_session_status][value]': 'accepted' + } }) .then(({ data }) => { + this.loaded = true this.sessions = data.data }) }