From ae2bb3a02857bba2ff0b74d55c19866e91908661 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 20 Feb 2024 23:26:09 -0600 Subject: [PATCH] Add missing style.css --- server/homebrew.api.js | 2 +- server/homebrew.api.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/homebrew.api.js b/server/homebrew.api.js index f77c429e2..36b885cb0 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -255,7 +255,7 @@ const api = { res.set('Content-Type', 'text/css'); } const parentTheme = themeParent ? `@import /api/css/${req.params.engine}/${themeParent}\n` : ''; - return res.status(200).send(`${parentTheme}@import /themes/${req.params.engine}/${req.params.id}\n`); + return res.status(200).send(`${parentTheme}@import /themes/${req.params.engine}/${req.params.id}/style.css\n`); } }, updateBrew : async (req, res)=>{ diff --git a/server/homebrew.api.spec.js b/server/homebrew.api.spec.js index 760e1ae75..c82ce5227 100644 --- a/server/homebrew.api.spec.js +++ b/server/homebrew.api.spec.js @@ -611,7 +611,7 @@ brew`); }; api.getStaticTheme(req, res); const sent = res.send.mock.calls[0][0]; - expect(sent).toBe('@import /themes/V3/5ePHB\n'); + expect(sent).toBe('@import /themes/V3/5ePHB/style.css\n'); expect(res.status).toHaveBeenCalledWith(200); }); it('should return an import of the theme including a parent.', async ()=>{ @@ -623,7 +623,7 @@ brew`); }; api.getStaticTheme(req, res); const sent = res.send.mock.calls[0][0]; - expect(sent).toBe('@import /api/css/V3/5ePHB\n@import /themes/V3/5eDMG\n'); + expect(sent).toBe('@import /api/css/V3/5ePHB\n@import /themes/V3/5eDMG/style.css\n'); expect(res.status).toHaveBeenCalledWith(200); }); it('should fail for an invalid static theme.', async()=>{