mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 01:42:42 +00:00
renaming "get" functions
rename `getStaticTheme` to `getStaticThemeCSS` rename `getBrewThemeWithCSS` to `getBrewThemeCSS` rename `getBrewThemeParent` to `getBrewThemeParentCSS` to avoid confusion with other "get" endpoints like `getBrew`, and unify naming for endpoint functions that return CSS. Simplify `isStaticTheme` function (getting the parent theme is handled elsewhere)
This commit is contained in:
@@ -9,7 +9,7 @@ const yaml = require('js-yaml');
|
||||
const app = express();
|
||||
const config = require('./config.js');
|
||||
|
||||
const { homebrewApi, getBrew, getBrewThemeWithCSS, getStaticTheme, getBrewThemeParent } = require('./homebrew.api.js');
|
||||
const { homebrewApi, getBrew, getBrewThemeCSS, getStaticThemeCSS, getBrewThemeParentCSS } = require('./homebrew.api.js');
|
||||
const GoogleActions = require('./googleActions.js');
|
||||
const serveCompressedStaticAssets = require('./static-assets.mv.js');
|
||||
const sanitizeFilename = require('sanitize-filename');
|
||||
@@ -79,9 +79,9 @@ app.get('/robots.txt', (req, res)=>{
|
||||
|
||||
// Theme
|
||||
|
||||
app.get('/css/:id', asyncHandler(getBrew('theme', false)), asyncHandler(getBrewThemeWithCSS));
|
||||
app.get('/css/:engine/:id/', asyncHandler(getStaticTheme));
|
||||
app.get('/cssParent/:id', asyncHandler(getBrew('theme', false)), asyncHandler(getBrewThemeParent));
|
||||
app.get('/css/:id', asyncHandler(getBrew('theme', false)), asyncHandler(getBrewThemeCSS));
|
||||
app.get('/css/:engine/:id/', asyncHandler(getStaticThemeCSS));
|
||||
app.get('/cssParent/:id', asyncHandler(getBrew('theme', false)), asyncHandler(getBrewThemeParentCSS));
|
||||
|
||||
|
||||
//Home page
|
||||
|
||||
Reference in New Issue
Block a user