Add Scrape History #15
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "dev/scrape-history"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP: Add Scrape Historyto Add Scrape History@ -0,0 +32,4 @@
return models.ScrapeHistory{}, utils.HandleError(ctx, span, localLogger, &otterError.Database{Reason: otterError.DatabaseIsNotConnected})
}
result := client.WithContext(ctx).Create(&scrapeHistory)
keine ID validierung / verifizierung?
@ -0,0 +68,4 @@
return models.ScrapeHistory{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.ScrapeTaskIDIsEmpty})
}
result := client.WithContext(ctx).First(&post, "scrape_task_id = ?", id)
ID wrong length check is missing
@ -0,0 +107,4 @@
if len(scrapeHistory.ScrapeTaskID) == 0 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.ScrapeTaskIDIsEmpty})
}
ID wrong length check is missing
@ -0,0 +152,4 @@
if len(id) == 0 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.ScrapeTaskIDIsEmpty})
}
ID wrong length check is missing
@ -0,0 +39,4 @@
if len(scrapeHistory.ScrapeTaskID) != 25 {
return models.ScrapeHistory{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.ScrapeTaskIDIsWrongLength})
}
UserSourceID validation is missing