@@ 53,8 53,8 @@ type postTagsDelete struct {
func TagsDelete(c *gin.Context) {
data := &postTagsDelete{}
if err := c.Bind(data); err != nil {
- log.Printf("[tixe/api] ERROR: Could not bind new tag data: %v", err)
- c.String(http.StatusBadRequest, "Could not bind new tag data")
+ log.Printf("[tixe/api] ERROR: Could not bind delete tag data: %v", err)
+ c.String(http.StatusBadRequest, "Could not bind delete tag data")
return;
}
@@ 64,8 64,8 @@ func TagsDelete(c *gin.Context) {
_, err := db.PgPool.Exec(context.Background(),
"DELETE FROM tags WHERE id = $1 AND user_id = $2", data.Id, user.Id)
if err != nil {
- log.Printf("[tixe/api] ERROR: Could not create new tag entry in database: %v", err)
- c.String(http.StatusInternalServerError, "Could not create new tag entry in database!")
+ log.Printf("[tixe/api] ERROR: Could not delete tag entry from database: %v", err)
+ c.String(http.StatusInternalServerError, "Could not delete tag entry from database!")
return;
}