Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added ts-functions/.yarn/install-state.gz
Binary file not shown.
2 changes: 0 additions & 2 deletions ts-functions/src/availableDates/index.ts

This file was deleted.

5 changes: 3 additions & 2 deletions ts-functions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { availableDates } from './availableDates';
export { tracks, trackById } from './tracks';
export { availableDates } from './availableDates/function';
export { fetchSetagayaAvailability } from './scrape/fetchSetagayaAvailability';
export { tracks, trackById } from './tracks/function';
16 changes: 16 additions & 0 deletions ts-functions/src/scrape/fetchSetagayaAvailability.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { onRequest } from 'firebase-functions/v2/https';
import * as logger from 'firebase-functions/logger';

export const fetchSetagayaAvailability = onRequest(
{
cors: process.env.IS_LOCAL ? '*' : process.env.CORS_URL?.split(', '),
},
(request, response) => handler(request, response)
);

const handler = (request: any, response: any) => {
console.log('req', request?.body);
const html = 'hello from fetchSetagayaAvailability';
logger.info(html, { structuredData: true });
return response.send(html);
};
1 change: 0 additions & 1 deletion ts-functions/src/tracks/index.ts

This file was deleted.

Loading