package handlers // DEPRECATED: As of September 4th, 2025. // const TAG_HTML = ` //
  • // × %s //
  • // ` // DEPRECATED: As of September 4th, 2025. // const TAG_LIST_HTML = ` // // ` // DEPRECATED: As of September 4th, 2025. // func NewTag(ctx *gin.Context) { // tag := strings.ToLower(ctx.PostForm("tag")) // tags := strings.Split(ctx.PostForm("tags"), ",") // // tags = append([]string{tag}, tags...) // // var html string // var cleaned_tags []string // for _, tag := range tags { // if tag != "" { // html += fmt.Sprintf(TAG_HTML, domain.STATE_TAGS_DELETE, tag, tag) // // // Ensure that the list provided does not contain blank spaces. // // This is another measure to ensure this state is bulletproof. // cleaned_tags = append(cleaned_tags, tag) // } // } // // // Execute OOB swap for the tags // html += fmt.Sprintf(TAG_LIST_HTML, strings.Join(cleaned_tags, ",")) // // ctx.String(http.StatusOK, html) // } // DEPRECATED: As of September 4th, 2025. // func DeleteTag(ctx *gin.Context) { // tags := strings.Split(ctx.PostForm("tags"), ",") // target := ctx.PostForm("target") // // var html string // var new_tags []string // for _, tag := range tags { // if tag != target && tag != "" { // html += fmt.Sprintf(TAG_HTML, domain.STATE_TAGS_DELETE ,tag, tag) // new_tags = append(new_tags, tag) // } // } // // // Execute OOB swap for the tags // html += fmt.Sprintf(TAG_LIST_HTML, strings.Join(new_tags, ",")) // // ctx.String(http.StatusOK, html) // }