fix: adiciona JWT_SECRET e ALLOWED_ORIGINS no docker-compose, e corrige enabled=1 para PostgreSQL nas rotas de imagens
continuous-integration/webhook Deploy concluido (rx.scoreodonto.com)

This commit is contained in:
VPS 4 Builder
2026-05-27 02:36:06 +02:00
parent 0b06b55c66
commit 9f4538786b
5 changed files with 286 additions and 7 deletions
+2 -2
View File
@@ -139,7 +139,7 @@ router.get('/:id', async (req, res) => {
router.get('/stats', async (req, res) => {
try {
const total = await db.get('SELECT COUNT(*) as count FROM images');
const enabled = await db.get('SELECT COUNT(*) as count FROM images WHERE enabled = 1');
const enabled = await db.get('SELECT COUNT(*) as count FROM images WHERE enabled = true');
const withTooth = await db.get('SELECT COUNT(*) as count FROM images WHERE tooth_number IS NOT NULL');
res.json({
@@ -305,7 +305,7 @@ router.put('/:id/patient-info', async (req, res) => {
patient_name_resumed = $1,
tooth_number = $2,
tooth_side = $3,
enabled = 1
enabled = true
WHERE id = $4`,
[patientNameResumed, toothNumber, toothSide, req.params.id]
);