0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 09:32:51 +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:
Víctor Losada Hernández
2024-06-11 00:33:36 +02:00
parent 99b0c2b54e
commit 90431efbc9
8 changed files with 43 additions and 37 deletions

View File

@@ -85,6 +85,7 @@ router.get('/admin/lookup/:id', mw.adminOnly, async (req, res, next)=>{
});
});
/* Find 50 brews that aren't compressed yet */
router.get('/admin/finduncompressed', mw.adminOnly, (req, res)=>{
const query = uncompressedBrewQuery.clone();
@@ -100,6 +101,7 @@ router.get('/admin/finduncompressed', mw.adminOnly, (req, res)=>{
});
});
/* Compresses the "text" field of a brew to binary */
router.put('/admin/compress/:id', (req, res)=>{
HomebrewModel.findOne({ _id: req.params.id })
@@ -121,6 +123,7 @@ router.put('/admin/compress/:id', (req, res)=>{
});
});
router.get('/admin/stats', mw.adminOnly, async (req, res)=>{
try {
const totalBrewsCount = await HomebrewModel.countDocuments({});