DEVELOPMENT ENVIRONMENT

~liljamo/tixe

2627bf3034b75eecf63afaad9b2ed57680220c35 — Jonni Liljamo 11 months ago 05027d8
fix: comments in TagsDelete
1 files changed, 4 insertions(+), 4 deletions(-)

M api/tags.go
M api/tags.go => api/tags.go +4 -4
@@ 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;
	}