From a81ac47be9dd14a519e6ea8222482ee1e4f0d89c Mon Sep 17 00:00:00 2001 From: Alex <2273103+SkeLLLa@users.noreply.github.com> Date: Sun, 29 Mar 2026 15:48:43 +0200 Subject: [PATCH] Fix: fix compatibility with flood changes (#6477) --- src/widgets/flood/proxy.js | 2 +- src/widgets/flood/proxy.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/flood/proxy.js b/src/widgets/flood/proxy.js index 730ca5ed6..172acdaf4 100644 --- a/src/widgets/flood/proxy.js +++ b/src/widgets/flood/proxy.js @@ -12,7 +12,7 @@ async function login(widget) { const loginParams = { method: "POST", headers: { "Content-Type": "application/json" }, - body: null, + body: "{}", }; if (widget.username && widget.password) { diff --git a/src/widgets/flood/proxy.test.js b/src/widgets/flood/proxy.test.js index a3b9564bb..a0eb59c5a 100644 --- a/src/widgets/flood/proxy.test.js +++ b/src/widgets/flood/proxy.test.js @@ -45,7 +45,7 @@ describe("widgets/flood/proxy", () => { expect(httpProxy).toHaveBeenCalledTimes(3); expect(httpProxy.mock.calls[0][0].toString()).toBe("http://flood/api/stats"); expect(httpProxy.mock.calls[1][0]).toBe("http://flood/api/auth/authenticate"); - expect(httpProxy.mock.calls[1][1].body).toBeNull(); + expect(httpProxy.mock.calls[1][1].body).toBe("{}"); expect(httpProxy.mock.calls[2][0].toString()).toBe("http://flood/api/stats"); expect(res.statusCode).toBe(200); expect(res.body).toEqual(Buffer.from("data"));