This commit is contained in:
parent
43e75b8ab2
commit
ab9ca2e909
|
@ -27,7 +27,6 @@ export const submissions = functions.runWith({
|
|||
memory: "1GB"
|
||||
}).https.onRequest(lingdocsAuth(
|
||||
async (req, res: functions.Response<FT.SubmissionsResponse | FT.FunctionError>) => {
|
||||
res.send({ ok: false, error: "function under maintenance" });
|
||||
if (!Array.isArray(req.body)) {
|
||||
res.status(400).send({
|
||||
ok: false,
|
||||
|
|
|
@ -35,9 +35,11 @@ export async function sendSubmissions() {
|
|||
const res = await postSubmissions(revRemoved);
|
||||
// delete the submissions that were received from the local submissions db
|
||||
console.log(res);
|
||||
res.submissions.forEach((submission) => {
|
||||
deleteFromLocalDb("submissions", submission._id);
|
||||
});
|
||||
if (res.submissions) {
|
||||
res.submissions.forEach((submission) => {
|
||||
deleteFromLocalDb("submissions", submission._id);
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("error posting submissions", err);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
|
|||
});
|
||||
}
|
||||
function handleOpenSignup() {
|
||||
popupRef = window.open("https://account.lingdocs.com", "account", "height=800,width=500,top=50,left=100");
|
||||
popupRef = window.open("https://account.lingdocs.com", "account", "height=800,width=500,top=50,left=400");
|
||||
}
|
||||
function handlePublish() {
|
||||
setPublishingStatus("publishing");
|
||||
|
|
Loading…
Reference in New Issue