Fix per evitare la creazione di un tag già esistente

This commit is contained in:
Luca 2024-08-01 15:40:18 +02:00
parent 7b91ee0efe
commit 400d6e7684
1 changed files with 4 additions and 7 deletions

View File

@ -50,14 +50,11 @@ switch (post('op')) {
]); ]);
$id_record = $dbo->lastInsertedID(); $id_record = $dbo->lastInsertedID();
flash()->info(tr('Nuovo tag aggiunto!')); if (isAjaxRequest()) {
echo json_encode(['id' => $id_record, 'text' => $nome]);
} }
if (isAjaxRequest()) { flash()->info(tr('Nuovo tag aggiunto!'));
echo json_encode([
'id' => $id_record,
'text' => $nome,
]);
} }
break; break;