re-enable publishing in dictionary using the new aws function
This commit is contained in:
parent
062f50b3a2
commit
9b3a422796
|
@ -1,22 +1,21 @@
|
||||||
import * as FT from "../types/functions-types";
|
import * as FT from "../types/functions-types";
|
||||||
import * as AT from "../types/account-types";
|
import * as AT from "../types/account-types";
|
||||||
|
|
||||||
type Service = "account" | "submissions"; // | "functions";
|
type Service = "account" | "submissions" | "functions";
|
||||||
|
|
||||||
const baseUrl: Record<Service, string> = {
|
const baseUrl: Record<Service, string> = {
|
||||||
account: "https://account.lingdocs.com/api/",
|
account: "https://account.lingdocs.com/api/",
|
||||||
// clean up redundancy in call, put it all in api?
|
// clean up redundancy in call, put it all in api?
|
||||||
submissions: "https://account.lingdocs.com/",
|
submissions: "https://account.lingdocs.com/",
|
||||||
|
functions: "https://functions.lingdocs.com/",
|
||||||
};
|
};
|
||||||
|
|
||||||
// FUNCTIONS CALLS - MUST BE RE-ROUTED THROUGH FIREBASE HOSTING IN ../../../firebase.json
|
|
||||||
export async function publishDictionary(): Promise<
|
export async function publishDictionary(): Promise<
|
||||||
FT.PublishDictionaryResponse | FT.FunctionError
|
FT.PublishDictionaryResponse | FT.FunctionError
|
||||||
> {
|
> {
|
||||||
throw new Error("not currently implemented on app");
|
return (await myFetch("functions", "publishDictionary")) as
|
||||||
// return (await myFetch("functions", "publishDictionary")) as
|
| FT.PublishDictionaryResponse
|
||||||
// | FT.PublishDictionaryResponse
|
| FT.FunctionError;
|
||||||
// | FT.FunctionError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function postSubmissions(
|
export async function postSubmissions(
|
||||||
|
|
Loading…
Reference in New Issue