From b77db4cbf6d69502dcb7bc36053caa785cdd8e90 Mon Sep 17 00:00:00 2001 From: arc-alex Date: Sat, 18 Nov 2023 21:17:44 +0100 Subject: [PATCH] rename to pull --- apps/server/src/controllers/ontimeController.ts | 2 +- apps/server/src/utils/sheetsAuth.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/server/src/controllers/ontimeController.ts b/apps/server/src/controllers/ontimeController.ts index d134bf917..4007cffbd 100644 --- a/apps/server/src/controllers/ontimeController.ts +++ b/apps/server/src/controllers/ontimeController.ts @@ -398,7 +398,7 @@ export async function previewExcel(req, res) { */ export async function previewSheet(req, res) { try { - const data = await Sheet.parse(req.body.sheetid, req.body.worksheet); + const data = await Sheet.pull(req.body.sheetid, req.body.worksheet); res.status(200).send(data); } catch (error) { res.status(500).send({ message: error.toString() }); diff --git a/apps/server/src/utils/sheetsAuth.ts b/apps/server/src/utils/sheetsAuth.ts index a63439094..82b580515 100644 --- a/apps/server/src/utils/sheetsAuth.ts +++ b/apps/server/src/utils/sheetsAuth.ts @@ -36,6 +36,7 @@ class sheet { return false; } } + /** * `parse` a given sheet @@ -45,7 +46,7 @@ class sheet { * @returns {Promise>} * @throws */ - public async parse(sheetId: string, worksheet: string, options = defaultExcelImportMap) { + public async pull(sheetId: string, worksheet: string, options = defaultExcelImportMap) { if (!sheet.client) { if (!(await this.authorized())) { throw new Error(`Sheet not authorized`);