From c52dda587414ab706260a720e5781c23c33f8398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregorio=20Palam=C3=A0?= Date: Thu, 7 Mar 2024 23:41:09 +0100 Subject: [PATCH] naming for api --- functions/src/api/http/api.ts | 3 +++ functions/src/index.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/src/api/http/api.ts b/functions/src/api/http/api.ts index d56f3a45..5d647046 100644 --- a/functions/src/api/http/api.ts +++ b/functions/src/api/http/api.ts @@ -29,6 +29,9 @@ app.addContentTypeParser('application/json', { parseAs: 'string' }, (req, body, app.get('/hello', async (req, res) => { return "hello"; }); +app.get('/', async (req, res) => { + return "hello root"; +}); export default onRequest((req, res) => { app.ready((err) => { diff --git a/functions/src/index.ts b/functions/src/index.ts index 80a62390..3fc4ec76 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -1,3 +1,3 @@ import * as http_api from './api/http/api'; -export { http_api }; \ No newline at end of file +exports.http_api = http_api.default; \ No newline at end of file