Skip to content

Commit

Permalink
fixed log printf warning
Browse files Browse the repository at this point in the history
  • Loading branch information
GarbhanK committed May 23, 2024
1 parent 7e2f846 commit 3bbd4ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/books.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ func DeleteBook(c *gin.Context) {
if err := doc.DataTo(&booksBuffer); err != nil {
log.Fatalf("can't cast docsnap to Book:\n%v", err)
}

titleLower := strings.ToLower(title)
parsedFirebaseTitle := strings.ToLower(booksBuffer.Title)

// append record to array
if (parsedFirebaseTitle == titleLower) {
bulkwriter.Delete(doc.Ref)
numDeleted++
}
}

}

Expand All @@ -290,7 +290,7 @@ func DeleteBook(c *gin.Context) {
bulkwriter.Flush()
}

log.Printf("Deleted collection: {}", collectionName)
log.Printf("Deleted collection: %s", collectionName)

c.JSON(http.StatusOK, gin.H{"data": true})
}

0 comments on commit 3bbd4ff

Please sign in to comment.