Skip to content

Commit

Permalink
fix: change new api to set eventCalendar
Browse files Browse the repository at this point in the history
  • Loading branch information
tjorbo committed Dec 19, 2023
1 parent f7dea07 commit 3e92e04
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/services/api_service_dataport.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import router from '@/router'
* @property {string} tel
* @property {string} email
* @property {string} website
* @property {string} eventCalender
* @property {Object<{identifier: string}>} eventCalender
* @property {string} facebook
* @property {string} twitter
* @property {string} youtube
Expand Down Expand Up @@ -117,8 +117,10 @@ function migrateCommonValues(element) {
Object.assign(institution, latLngToPos(element.latitude, element.longitude))
}

institution.categories = [...new Set(element.categories.map(category => category.name))].sort()
institution.tags = [...element.tags.map(tag => tag.name)].sort()
institution.categories = [...new Set(element.categories.map(category => category.name))]
.sort((a, b) => { return a - b })
institution.tags = [...element.tags.map(tag => tag.name)]
.sort((a, b) => { return a - b })

if (!institution.audio) institution.audio = []
if (!institution.images) institution.images = []
Expand Down Expand Up @@ -331,7 +333,9 @@ export class ApiServiceDataport {
institution.website = communication.value
break
case 'EventUrl':
institution.eventCalender = communication.value
institution.eventCalender = {
identifier: communication.value
}
break
case 'Facebook':
institution.facebook = communication.value
Expand Down

0 comments on commit 3e92e04

Please sign in to comment.