Added some errors accuracy on del article handler

This commit is contained in:
Florian Sylvain committed 2022-12-27 18:46:35 +01:00
1 parent bb324d3df4
commit 6593f38eb5
1 file changed
+5 -1
+5 -1
View File
@@ -68,7 +68,11 @@ func DeleteArticleHandler(c *gin.Context) {
return 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) { func EditArticleHandler(c *gin.Context) {