Update homebrew.api.js

This commit is contained in:
Trevor Buckner authored and GitHub committed 2024-10-11 23:41:54 -04:00
1 parent dfe26280d2
commit 9037cf1750
1 file changed
+3
+3
View File
@@ -9,6 +9,7 @@ const yaml = require('js-yaml');
const asyncHandler = require('express-async-handler'); const asyncHandler = require('express-async-handler');
const { nanoid } = require('nanoid'); const { nanoid } = require('nanoid');
const { splitTextStyleAndMetadata } = require('../shared/helpers.js'); const { splitTextStyleAndMetadata } = require('../shared/helpers.js');
const { DEFAULT_BREW, DEFAULT_BREW_LOAD } = require('./brewDefaults.js'); const { DEFAULT_BREW, DEFAULT_BREW_LOAD } = require('./brewDefaults.js');
const Themes = require('../themes/themes.json'); const Themes = require('../themes/themes.json');
@@ -266,6 +267,7 @@ const api = {
getThemeBundle : async(req, res)=>{ getThemeBundle : async(req, res)=>{
/* getThemeBundle: Collects the theme and all parent themes /* getThemeBundle: Collects the theme and all parent themes
returns an object containing an array of css, and an array of snippets, in render order returns an object containing an array of css, and an array of snippets, in render order
req.params.id : The shareId ( User theme ) or name ( static theme ) req.params.id : The shareId ( User theme ) or name ( static theme )
req.params.renderer : The Markdown renderer used for this theme */ req.params.renderer : The Markdown renderer used for this theme */
@@ -392,6 +394,7 @@ const api = {
// Call and wait for afterSave to complete // Call and wait for afterSave to complete
const after = await afterSave(); const after = await afterSave();
if(!after) return; if(!after) return;
res.status(200).send(saved); res.status(200).send(saved);
}, },
deleteGoogleBrew : async (account, id, editId, res)=>{ deleteGoogleBrew : async (account, id, editId, res)=>{