mail: add search param

This commit is contained in:
Girish Ramakrishnan
2020-02-13 09:08:47 -08:00
parent 0aaecf6e46
commit 938ca6402c
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ function getEventlog(req, res, next) {
var perPage = typeof req.query.per_page !== 'undefined'? parseInt(req.query.per_page) : 25;
if (!perPage || perPage < 0) return next(new HttpError(400, 'per_page query param has to be a positive number'));
mail.getEventlog(page, perPage, function (error, result) {
mail.getEventlog(req.query.search || '', page, perPage, function (error, result) {
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, { eventlogs: result }));