Skip to content

Commit

Permalink
Update v2.4.0 (#231)
Browse files Browse the repository at this point in the history
* feat: add support to Deck2 (#219)

* fix: add company description (#220)

* feat: add sponsors site (#223)

Co-authored-by: André Romão <[email protected]>

* adds calendar to event in cannon (#224)

* improves promo codes (#225)

* improves compatibility with new deck (#229)

* Fix event id type (#230)

* improves compatibility with new deck

* revert and fix

* fix deck url in config

* fix eventId

* fix

---------

Co-authored-by: Nuno Alves <[email protected]>
Co-authored-by: Pedro Maximino <[email protected]>
  • Loading branch information
3 people authored Apr 14, 2024
1 parent f36ead9 commit 73a1f2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ config.webapp = {
}

config.deck = {
url: process.env.CANNON_EVENTDECK_URL || 'https://deck.sinfo.org'
url: process.env.CANNON_EVENTDECK_URL || 'https://deck.sinfo.org/api'
}

config.upload = {
Expand Down
6 changes: 3 additions & 3 deletions server/resources/deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ server.method('deck.getSession', getSession, {})
server.method('deck.getSpeakers', getSpeakers, {})
server.method('deck.getSpeaker', getSpeaker, {})

const DECK_API_URL = `${config.deck.url}/api`
const DECK_API_URL = `${config.deck.url}`

async function getLatestEdition() {
const event = await axios.get(`${DECK_API_URL}/public/events?current=true`, { json: true })
Expand Down Expand Up @@ -91,7 +91,7 @@ async function getSpeaker(speakerId) {
// Translate Deck's event object to old format
function transformEvent(event, options) {
return {
id: event.id,
id: String(event.id),
name: event.name,
kind: options?.kind || "Main Event",
public: options?.public || true,
Expand Down Expand Up @@ -149,7 +149,7 @@ function transformSession(session, options) {
name: session.title,
description: session.description,
kind: sessionKinds[session.kind] || session.kind,
event: options?.event || (session.company?.participation?.length > 0 && session.company.participation[0].event),
event: String(options?.event || (session.company?.participation?.length > 0 && session.company.participation[0].event)),
date: session.begin,
duration: new Date(new Date(session.end) - new Date(session.begin)),
place: session.place,
Expand Down

0 comments on commit 73a1f2d

Please sign in to comment.