up
This commit is contained in:
parent
e3887bef74
commit
0f21d346a5
@ -54,11 +54,21 @@ func HandleAddJobsMultiple(db *gorm.DB) gin.HandlerFunc {
|
||||
}
|
||||
|
||||
// 2. Vérification du dossier principal
|
||||
var basePath models.PathDownload
|
||||
if err := db.First(&basePath, baseID).Error; err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "Dossier principal introuvable"})
|
||||
return
|
||||
}
|
||||
var paths []models.PathDownload
|
||||
if err := db.Find(&paths).Error; err != nil {
|
||||
log.Printf("[DEBUG] Erreur lors du Find: %v", err)
|
||||
} else {
|
||||
log.Printf("[DEBUG] Contenu de la table PathDownload avant recherche: %+v", paths)
|
||||
}
|
||||
|
||||
var basePath models.PathDownload
|
||||
if err := db.First(&basePath, baseID).Error; err != nil {
|
||||
log.Printf("[DEBUG] Pas trouvé baseID=%v dans PathDownload", baseID)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "Dossier principal introuvable"})
|
||||
return
|
||||
}
|
||||
log.Printf("[DEBUG] PathDownload trouvé pour baseID=%v: %+v", baseID, basePath)
|
||||
|
||||
|
||||
// 3. Initialisation Debrid-Link
|
||||
ctx := context.Background()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user