From f7b144c64d41d0bceedc954e9010c2c3d860aa92 Mon Sep 17 00:00:00 2001 From: lilsweetcaligula <15699226+lilsweetcaligula@users.noreply.github.com> Date: Wed, 8 Jan 2020 17:18:11 +0200 Subject: [PATCH] fix: runtime error --- functions/models/promise/update.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/models/promise/update.ts b/functions/models/promise/update.ts index 5b605e8..79a5b44 100644 --- a/functions/models/promise/update.ts +++ b/functions/models/promise/update.ts @@ -5,15 +5,15 @@ import admin from 'firebase-admin'; import { ensureAllListsExistById, updatePromiseIdInLists, - collection + collection, + get } from './index'; -import promiseModel from './index'; const update = (db: admin.firestore.Firestore) => async ( id: string, data: IUpdatePromise ) => { - const promise = await promiseModel.get(id); + const promise = await get(id); if (_.isEmpty(promise)) { return { status: 404, message: 'Invalid Promise' }; }