Revert "Merge pull request 'Завершить аналитику расходов и доходов' (#35) from feature/analytics-completion into main"
This reverts commit66c04b0618, reversing changes made toefc9854064.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user