PostsDelete done
This commit is contained in:
@@ -85,3 +85,14 @@ func PostsUpdate(c *gin.Context) {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func PostsDelete(c *gin.Context) {
|
||||
// Get the id off the url
|
||||
id := c.Param("id")
|
||||
|
||||
// Delete the posts
|
||||
initializers.DB.Delete(&models.Post{}, id)
|
||||
|
||||
// Responmd
|
||||
c.Status(200)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user