Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…nctions into develop
  • Loading branch information
fgruchala committed Mar 31, 2019
2 parents d6b23e1 + dc6b2b0 commit 31aca71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 18 additions & 0 deletions functions/src/editions/functions/find-all-from-conference-hall.ts
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));
};
2 changes: 0 additions & 2 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as admin from 'firebase-admin';
import * as functions from 'firebase-functions';

import findOneFromConferenceHall from './editions/functions/find-one-from-conference-hall';

import findAllActivePartners from './partners/functions/find-all-active-partners';
import makeBillingForPartner from './partners/functions/make-billing-for-partner';

Expand Down

0 comments on commit 31aca71

Please sign in to comment.