chore: refacto

This commit is contained in:
2026-03-27 22:23:46 +01:00
parent 75bf4caaa1
commit 5380abe8ed
67 changed files with 1751 additions and 2573 deletions
+2 -3
View File
@@ -8,13 +8,13 @@ import (
func (d *Database) GetDeliveryIssues(status string) ([]models.DeliveryIssue, error) {
query := `
SELECT id, command_id, issue_type, description, status,
SELECT id, command_id, issue_type, description, status,
reported_by, COALESCE(resolved_by, ''), COALESCE(resolution, ''),
created_at, updated_at
FROM delivery_issues
`
var args []interface{}
var args []any
if status != "" {
query += " WHERE status = $1"
args = append(args, status)
@@ -76,7 +76,6 @@ func (d *Database) CreateDeliveryIssue(commandID int, issueType, description, re
return nil, fmt.Errorf("erreur création problème: %w", err)
}
log.Printf("✅ Problème créé: ID=%d, Type=%s, Commande=%d", issue.ID, issueType, commandID)
return &issue, nil
}