eventlog: branding events
This commit is contained in:
@@ -31,7 +31,7 @@ async function setFooter(req, res, next) {
|
||||
|
||||
if (typeof req.body.footer !== 'string') return next(new HttpError(400, 'footer is required'));
|
||||
|
||||
const [error] = await safe(branding.setFooter(req.body.footer));
|
||||
const [error] = await safe(branding.setFooter(req.body.footer, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, {}));
|
||||
@@ -63,7 +63,7 @@ async function setCloudronAvatar(req, res, next) {
|
||||
safe.fs.unlinkSync(req.files.avatar.path);
|
||||
if (!avatar) return next(500, safe.error.message);
|
||||
|
||||
const [error] = await safe(branding.setCloudronAvatar(avatar));
|
||||
const [error] = await safe(branding.setCloudronAvatar(avatar, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, {}));
|
||||
|
||||
Reference in New Issue
Block a user