diff --git a/src/http/controllers/api/storage.js b/src/http/controllers/api/storage.js index eb26474e2ae095c7053605c8a47b587a8504da5a..1cbad527bb2c6a5dffc04dbe2698e5ac14f6b6b1 100644 --- a/src/http/controllers/api/storage.js +++ b/src/http/controllers/api/storage.js @@ -4,6 +4,7 @@ const HttpError = require('core/errors/HttpError') const mimeType = require('mime-types') const uuid = require('uuid/v4') const { fs, env } = require('bootstrap') +const moment = require('moment') const storage = new Storage({ keyFilename: fs.path('google-storage.json') }) @@ -87,6 +88,9 @@ exports.feed = async ctx => { feed: (await File.findAll({ where: { approved: true, + created_at: { + [Sequelize.Op.gt]: moment.utc().subtract(1, 'month').toISOString(), + }, }, order: [['created_at', 'desc']], attributes: {