debug server side dictionary api

This commit is contained in:
adueck 2022-11-09 14:17:51 +05:00
parent 30f51385f3
commit e356986bff
3 changed files with 7 additions and 6 deletions

View File

@ -18,6 +18,7 @@ dictionaryRouter.post("/entries", async (req, res, next) => {
return res.send({ ok: false, message: "dictionary not ready" });
}
const ids = req.body.ids as (number | string)[];
console.log({ ids });
if (!Array.isArray(ids)) {
return res.status(400).send({ ok: false, error: "invalid query" });
}

View File

@ -1,6 +0,0 @@
POST http://localhost:4000/dictionary/entries
content-type: application/json
{
"ids": ["کور", 1527815306]
}

6
account/test.http Normal file
View File

@ -0,0 +1,6 @@
POST https://account.lingdocs.com/dictionary/entries HTTP/1.1
content-type: application/json
{
"ids": ["ليدل", 1527815306]
}