fix group id
This commit is contained in:
parent
ccbf824390
commit
833470cbdb
@ -13,7 +13,16 @@ export default {
|
||||
try {
|
||||
const limit = parseInt(req.query.limit) || 20;
|
||||
const offset = parseInt(req.query.offset) || 0;
|
||||
const { group_id } = req.query;
|
||||
|
||||
// Создаем условия для фильтрации
|
||||
const where = {};
|
||||
if (group_id) {
|
||||
where.group_id = group_id;
|
||||
}
|
||||
|
||||
const result = await GroupSubscriber.findAndCountAll({
|
||||
where,
|
||||
include: [MailingGroup, Subscriber],
|
||||
limit,
|
||||
offset,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user