From 88175fedc5ff1bfe10cba776e68e9ddfea0602b2 Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Tue, 19 Mar 2024 10:24:31 +0100 Subject: [PATCH] add small delay --- pass/routes/api.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pass/routes/api.js b/pass/routes/api.js index a61bfaf..7bfe186 100644 --- a/pass/routes/api.js +++ b/pass/routes/api.js @@ -64,9 +64,10 @@ router.get("/key/:key", (req, res) => { }; if (!isAuthorized(req)) { delete key_data.charge_orders; + setTimeout(() => res.json(key_data), 250); + } else { + res.json(key_data); } - - res.json(key_data); }); }); -- GitLab