Added some errors accuracy on del article handler

This commit is contained in:
Florian Sylvain
2022-12-27 18:46:35 +01:00
parent bb324d3df4
commit 6593f38eb5
+5 -1
View File
@@ -68,7 +68,11 @@ func DeleteArticleHandler(c *gin.Context) {
return
}
SendOk(c, fmt.Sprintf("%d articles were successfully deleted!", deleteCount))
if deleteCount != 0 {
SendOk(c, fmt.Sprintf("%d articles were successfully deleted!", deleteCount))
} else {
SendOk(c, "No articles were deleted.")
}
}
func EditArticleHandler(c *gin.Context) {