File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ const { getLandingLinks } = require ( './http-utils' ) ;
2+
3+ const queryPages = /* GraphQL */ `
4+ query($conferenceTitle: ConferenceTitle, $eventYear: EventYear) {
5+ conf: conferenceBrand(where: { title: $conferenceTitle }) {
6+ id
7+ year: conferenceEvents(where: { year: $eventYear }) {
8+ id
9+ emsEventId
10+ }
11+ }
12+ }
13+ ` ;
14+
15+ const fetchData = async ( client , vars ) => {
16+ const data = await client . request ( queryPages , vars ) . then ( res => {
17+ return res . conf . year [ 0 ] . emsEventId ;
18+ } ) ;
19+
20+ const landingLinks = ( await getLandingLinks ( data ) ) || [ ] ;
21+
22+ return {
23+ landingLinks,
24+ } ;
25+ } ;
26+
27+ module . exports = {
28+ fetchData,
29+ queryPages,
30+ getData : res => res ,
31+ story : 'landingLinks' ,
32+ } ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ const getMcs = baseEventFetch('users?role=MC');
2727const getCommittee = baseEventFetch ( 'users?role=PC' ) ;
2828const getFreeWorkshops = baseEventFetch ( 'free-workshops' ) ;
2929const getEvent = baseEventFetch ( '' ) ;
30+ const getLandingLinks = baseEventFetch ( 'latestLinks' ) ;
3031
3132module . exports = {
3233 getSpeakers,
@@ -40,4 +41,5 @@ module.exports = {
4041 getCommittee,
4142 getEvent,
4243 getFreeWorkshops,
44+ getLandingLinks,
4345} ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const extContent = require('./fetch-extended');
1616const jobsContent = require ( './fetch-jobs' ) ;
1717const committeeContent = require ( './fetch-committee' ) ;
1818const diversityContent = require ( './fetch-diversity' ) ;
19+ const latestLinksContent = require ( './fetch-landings' ) ;
1920const { postProcessLayer } = require ( './postprocess' ) ;
2021
2122const createClient = ( { endpoint, token } ) => {
@@ -57,6 +58,7 @@ const getContent = async conferenceSettings => {
5758 jobsContent ,
5859 committeeContent ,
5960 diversityContent ,
61+ latestLinksContent ,
6062 ] . map ( async content => {
6163 try {
6264 getQueriesData ( content , conferenceSettings ) ;
You can’t perform that action at this time.
0 commit comments