This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/GDG-Lille/cms4devfest-fu…
…nctions into develop
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
functions/src/editions/functions/find-all-from-conference-hall.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as functions from 'firebase-functions'; | ||
import editionsService from '../../editions/business/services/editions.service'; | ||
|
||
export default (data, context) => { | ||
const editionId = data.editionId; | ||
console.log('editionId', editionId); | ||
|
||
if (!context.auth) { | ||
throw new functions.https.HttpsError('unauthenticated', 'You must be authenticated to access this resource.'); | ||
} | ||
|
||
if (editionId === undefined) { | ||
throw new functions.https.HttpsError('invalid-argument', 'Required editionId field in the request.'); | ||
} | ||
|
||
return editionsService.findOne(editionId) | ||
.then(edition => editionsService.findOneOnConferenceHall(edition.conferenceHall.eventId, edition.conferenceHall.apiKey)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters