Revert "Merge pull request 'Завершить аналитику расходов и доходов' (#35) from feature/analytics-completion into main"

This reverts commit 66c04b0618, reversing
changes made to efc9854064.
This commit is contained in:
2026-08-21 06:10:20 +03:00
parent 66c04b0618
commit d86624b9ef
9 changed files with 6 additions and 37 deletions

View File

@@ -8,7 +8,7 @@ const router = Router();
router.get(
'/summary',
asyncHandler(async (req, res) => {
const { from, to, accountId, categoryId, onlyConfirmed } = req.query;
const { from, to, accountId, onlyConfirmed } = req.query;
if (!from || !to) {
res.status(400).json({ error: 'BAD_REQUEST', message: 'from and to are required' });
return;
@@ -18,7 +18,6 @@ router.get(
from: from as string,
to: to as string,
accountId: accountId ? Number(accountId) : undefined,
categoryId: categoryId ? Number(categoryId) : undefined,
onlyConfirmed: onlyConfirmed === 'true',
});
res.json(result);
@@ -28,7 +27,7 @@ router.get(
router.get(
'/by-category',
asyncHandler(async (req, res) => {
const { from, to, accountId, categoryId, onlyConfirmed } = req.query;
const { from, to, accountId, onlyConfirmed } = req.query;
if (!from || !to) {
res.status(400).json({ error: 'BAD_REQUEST', message: 'from and to are required' });
return;
@@ -38,7 +37,6 @@ router.get(
from: from as string,
to: to as string,
accountId: accountId ? Number(accountId) : undefined,
categoryId: categoryId ? Number(categoryId) : undefined,
onlyConfirmed: onlyConfirmed === 'true',
});
res.json(result);