mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Added currentCountQuery for emails limit
refs https://github.com/TryGhost/Team/issues/588 - This is a basic implementation which needs a review. Implemented it to fix failing tests in main - Start date is expected to come formatted for DB's needs
This commit is contained in:
parent
0d242b96ef
commit
ebfad4bea4
@ -9,7 +9,16 @@ module.exports = {
|
||||
return result.count;
|
||||
}
|
||||
},
|
||||
emails: {},
|
||||
emails: {
|
||||
currentCountQuery: async (db, startDate) => {
|
||||
let result = await db.knex('emails')
|
||||
.count('id', {as: 'count'})
|
||||
.where('created_at', '>=', startDate)
|
||||
.first();
|
||||
|
||||
return result.count;
|
||||
}
|
||||
},
|
||||
staff: {
|
||||
currentCountQuery: async (db) => {
|
||||
let result = await db.knex('users')
|
||||
|
Loading…
Reference in New Issue
Block a user