oops - put auth back in front of publish
This commit is contained in:
parent
fcfe5cfc09
commit
6d957bc0c3
|
@ -7,23 +7,23 @@ import publish from "./publish";
|
||||||
export const publishDictionary = functions.runWith({
|
export const publishDictionary = functions.runWith({
|
||||||
timeoutSeconds: 60,
|
timeoutSeconds: 60,
|
||||||
memory: "2GB"
|
memory: "2GB"
|
||||||
}).https.onRequest(async (req, res) => {
|
}).https.onRequest(
|
||||||
// lingdocsAuth(
|
lingdocsAuth(
|
||||||
// async (req, res: functions.Response<FT.PublishDictionaryResponse | FT.FunctionError>) => {
|
async (req, res: functions.Response<FT.PublishDictionaryResponse | FT.FunctionError>) => {
|
||||||
// if (req.user.level !== "editor") {
|
if (req.user.level !== "editor") {
|
||||||
// res.status(403).send({ ok: false, error: "403 forbidden" });
|
res.status(403).send({ ok: false, error: "403 forbidden" });
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// try {
|
try {
|
||||||
const response = await publish();
|
const response = await publish();
|
||||||
res.send(response);
|
res.send(response);
|
||||||
// } catch (e) {
|
} catch (e) {
|
||||||
// // @ts-ignore
|
// @ts-ignore
|
||||||
// res.status(500).send({ ok: false, error: e.message });
|
res.status(500).send({ ok: false, error: e.message });
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// )
|
)
|
||||||
});
|
);
|
||||||
|
|
||||||
export const submissions = functions.runWith({
|
export const submissions = functions.runWith({
|
||||||
timeoutSeconds: 30,
|
timeoutSeconds: 30,
|
||||||
|
|
Loading…
Reference in New Issue