fix: resolve ambiguous order by vencimento error in portal financial and boletos endpoints
Build and Deploy (Gitea) / build-and-deploy (push) Successful in 2m2s
Details
Build and Deploy (Gitea) / build-and-deploy (push) Successful in 2m2s
Details
This commit is contained in:
parent
438c175246
commit
7951787b16
|
|
@ -308,7 +308,7 @@ app.get('/api/portal/financeiro', authMiddleware, async (req, res) => {
|
|||
TO_CHAR(data_pagamento, 'YYYY-MM-DD') as data_pagamento
|
||||
FROM alunos_cobrancas
|
||||
WHERE aluno_id = $1
|
||||
ORDER BY vencimento ASC`,
|
||||
ORDER BY alunos_cobrancas.vencimento ASC`,
|
||||
[req.user.studentId]
|
||||
);
|
||||
dbRows = rows || [];
|
||||
|
|
@ -388,7 +388,7 @@ app.get('/api/portal/financeiro', authMiddleware, async (req, res) => {
|
|||
app.get('/api/portal/boletos', authMiddleware, async (req, res) => {
|
||||
try {
|
||||
const { rows } = await pool.query(
|
||||
`SELECT *, TO_CHAR(vencimento, 'YYYY-MM-DD') as vencimento, TO_CHAR(data_pagamento, 'YYYY-MM-DD') as data_pagamento FROM alunos_cobrancas WHERE aluno_id = $1 ORDER BY vencimento ASC`,
|
||||
`SELECT *, TO_CHAR(vencimento, 'YYYY-MM-DD') as vencimento, TO_CHAR(data_pagamento, 'YYYY-MM-DD') as data_pagamento FROM alunos_cobrancas WHERE aluno_id = $1 ORDER BY alunos_cobrancas.vencimento ASC`,
|
||||
[req.user.studentId]
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue