mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
"Removed ArchivePage and related files, replaced with VaultPage, updated routes and API endpoints, and made minor changes to theme configuration and error handling."
This commit is contained in:
@@ -54,7 +54,7 @@ app.use((req, res, next)=>{
|
||||
|
||||
app.use(homebrewApi);
|
||||
app.use(require('./admin.api.js'));
|
||||
app.use(require('./archive.api.js'));
|
||||
app.use(require('./vault.api.js'));
|
||||
|
||||
const HomebrewModel = require('./homebrew.model.js').model;
|
||||
const welcomeText = require('fs').readFileSync('client/homebrew/pages/homePage/welcome_msg.md', 'utf8');
|
||||
@@ -462,8 +462,8 @@ app.use(async (err, req, res, next)=>{
|
||||
res.status(err.status || err.response?.status || 500).send(err);
|
||||
return;
|
||||
}
|
||||
if(err.originalUrl?.startsWith('/archive/')) {
|
||||
// console.log('archive error');
|
||||
if(err.originalUrl?.startsWith('/vault/')) {
|
||||
// console.log('vault error');
|
||||
res.status(err.status || err.response?.status || 500).send(err);
|
||||
return;
|
||||
}
|
||||
@@ -490,8 +490,6 @@ app.use(async (err, req, res, next)=>{
|
||||
res.send(page);
|
||||
});
|
||||
|
||||
|
||||
|
||||
app.use((req, res)=>{
|
||||
if(!res.headersSent) {
|
||||
console.error('Headers have not been sent, responding with a server error.', req.url);
|
||||
|
||||
Reference in New Issue
Block a user