mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Lint
This commit is contained in:
@@ -30,9 +30,7 @@ const BrewCompress = createClass({
|
||||
},
|
||||
cleanup(){
|
||||
this.setState({ pending: true });
|
||||
this.state.ids.forEach((id) => {
|
||||
console.log("trying to compress this one:");
|
||||
console.log(id);
|
||||
this.state.ids.forEach((id)=>{
|
||||
request.put(`/admin/compress/${id}`)
|
||||
.catch((err)=>this.setState({ error: err }))
|
||||
.finally(()=>this.setState({ pending: false, primed: false }));
|
||||
|
||||
@@ -68,7 +68,7 @@ router.get('/admin/lookup/:id', mw.adminOnly, (req, res, next)=>{
|
||||
router.get('/admin/finduncompressed', mw.adminOnly, (req, res)=>{
|
||||
uncompressedBrewQuery.exec((err, objs)=>{
|
||||
if(err) return res.status(500).send(err);
|
||||
return res.json({ count: objs.length, ids: objs});
|
||||
return res.json({ count: objs.length, ids: objs });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -78,7 +78,7 @@ router.put('/admin/compress/:id', (req, res)=>{
|
||||
.then((brew)=>{
|
||||
brew.textBin = zlib.deflateRawSync(brew.text); // Compress brew text to binary before saving
|
||||
brew.text = undefined; // Delete the non-binary text field since it's not needed anymore
|
||||
|
||||
|
||||
brew.save((err, obj)=>{
|
||||
if(err) throw err;
|
||||
return res.status(200).send(obj);
|
||||
|
||||
Reference in New Issue
Block a user