Added some errors accuracy on del article handler
This commit is contained in:
1 parent
bb324d3df4
commit
6593f38eb5
1 file changed
+5
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user