feat: add shortcut config foundation

This commit is contained in:
Federico Jaramillo Martinez
2026-06-03 20:41:16 +02:00
parent 4495a26ffd
commit a58c2113f4
20 changed files with 558 additions and 268 deletions
+2 -2
View File
@@ -37,11 +37,11 @@ describe("config routes", () => {
const response = await app.inject({
method: "PUT",
url: "/api/config",
payload: { config: { host: "0.0.0.0", port: 9000, allowedHosts: true } },
payload: { config: { host: "0.0.0.0", port: 9000, allowedHosts: true, shortcuts: { "core:view.chat": "mod+1", "core:session.stop": null } } },
});
expect(response.statusCode).toBe(200);
expect(savedConfig).toEqual({ host: "0.0.0.0", port: 9000, allowedHosts: true });
expect(savedConfig).toEqual({ host: "0.0.0.0", port: 9000, allowedHosts: true, shortcuts: { "core:view.chat": "mod+1", "core:session.stop": null } });
expect(response.json<PiWebConfigResponse>().config).toEqual(savedConfig);
});