From df685c3edb784091ec4caaba53f88f62efc618c2 Mon Sep 17 00:00:00 2001 From: adueck Date: Wed, 27 Nov 2024 23:03:26 +0500 Subject: [PATCH] try with new submissions backend --- website/src/lib/backend-calls.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/website/src/lib/backend-calls.ts b/website/src/lib/backend-calls.ts index a3de54d..1c008cf 100644 --- a/website/src/lib/backend-calls.ts +++ b/website/src/lib/backend-calls.ts @@ -1,27 +1,29 @@ import * as FT from "../types/functions-types"; import * as AT from "../types/account-types"; -type Service = "account" | "functions"; +type Service = "account" | "submissions"; // | "functions"; const baseUrl: Record = { account: "https://account.lingdocs.com/api/", - functions: "https://functions.lingdocs.com/", + // clean up redundancy in call, put it all in api? + submissions: "https://account.lingdocs.com/", }; // FUNCTIONS CALLS - MUST BE RE-ROUTED THROUGH FIREBASE HOSTING IN ../../../firebase.json export async function publishDictionary(): Promise< FT.PublishDictionaryResponse | FT.FunctionError > { - return (await myFetch("functions", "publishDictionary")) as - | FT.PublishDictionaryResponse - | FT.FunctionError; + throw new Error("not currently implemented on app"); + // return (await myFetch("functions", "publishDictionary")) as + // | FT.PublishDictionaryResponse + // | FT.FunctionError; } export async function postSubmissions( submissions: FT.SubmissionsRequest ): Promise { return (await myFetch( - "functions", + "submissions", "submissions", "POST", submissions