mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 20:12:41 +00:00
Merge pull request #3953 from G-Ambatte/fixAdminAddedAsAuthor-#3952
Fix admin added as author #3952
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import {model as HomebrewModel } from './homebrew.model.js';
|
import { model as HomebrewModel } from './homebrew.model.js';
|
||||||
import {model as NotificationModel } from './notifications.model.js';
|
import { model as NotificationModel } from './notifications.model.js';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import Moment from 'moment';
|
import Moment from 'moment';
|
||||||
import zlib from 'zlib';
|
import zlib from 'zlib';
|
||||||
@@ -108,6 +108,9 @@ router.put('/admin/clean/script/:id', asyncHandler(HomebrewAPI.getBrew('admin',
|
|||||||
|
|
||||||
req.body = brew;
|
req.body = brew;
|
||||||
|
|
||||||
|
// Remove Account from request to prevent Admin user from being added to brew as an Author
|
||||||
|
req.account = undefined;
|
||||||
|
|
||||||
return await HomebrewAPI.updateBrew(req, res);
|
return await HomebrewAPI.updateBrew(req, res);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user