This commit is contained in:
lingdocs 2021-08-24 19:09:34 +04:00
parent 43e75b8ab2
commit ab9ca2e909
3 changed files with 6 additions and 5 deletions

View File

@ -27,7 +27,6 @@ export const submissions = functions.runWith({
memory: "1GB" memory: "1GB"
}).https.onRequest(lingdocsAuth( }).https.onRequest(lingdocsAuth(
async (req, res: functions.Response<FT.SubmissionsResponse | FT.FunctionError>) => { async (req, res: functions.Response<FT.SubmissionsResponse | FT.FunctionError>) => {
res.send({ ok: false, error: "function under maintenance" });
if (!Array.isArray(req.body)) { if (!Array.isArray(req.body)) {
res.status(400).send({ res.status(400).send({
ok: false, ok: false,

View File

@ -35,9 +35,11 @@ export async function sendSubmissions() {
const res = await postSubmissions(revRemoved); const res = await postSubmissions(revRemoved);
// delete the submissions that were received from the local submissions db // delete the submissions that were received from the local submissions db
console.log(res); console.log(res);
res.submissions.forEach((submission) => { if (res.submissions) {
deleteFromLocalDb("submissions", submission._id); res.submissions.forEach((submission) => {
}); deleteFromLocalDb("submissions", submission._id);
});
}
} catch (err) { } catch (err) {
console.error("error posting submissions", err); console.error("error posting submissions", err);
} }

View File

@ -68,7 +68,7 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
}); });
} }
function handleOpenSignup() { 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() { function handlePublish() {
setPublishingStatus("publishing"); setPublishingStatus("publishing");