diff --git a/src/discord/rest.go b/src/discord/rest.go index 61e9762b..cc9c36f1 100644 --- a/src/discord/rest.go +++ b/src/discord/rest.go @@ -400,7 +400,6 @@ func RemoveGuildMemberRole(ctx context.Context, userID, roleID string) error { const name = "Remove Guild Member Role" path := fmt.Sprintf("/guilds/%s/members/%s/roles/%s", config.Config.Discord.GuildID, userID, roleID) - logging.ExtractLogger(ctx).Warn().Str("path", path).Msg("I dunno") res, err := doWithRateLimiting(ctx, name, func(ctx context.Context) *http.Request { return makeRequest(ctx, http.MethodDelete, path, nil) }) diff --git a/src/discord/showcase.go b/src/discord/showcase.go index 85d0fc1a..bf2f3909 100644 --- a/src/discord/showcase.go +++ b/src/discord/showcase.go @@ -742,7 +742,15 @@ func updateSnippetTags(ctx context.Context, dbConn db.ConnOrTx, userID string, s } for _, tagID := range tagIDs { - _, err = tx.Exec(ctx, `INSERT INTO snippet_tags (snippet_id, tag_id) VALUES ($1, $2)`, snippet.ID, tagID) + _, err = tx.Exec(ctx, + ` + INSERT INTO snippet_tags (snippet_id, tag_id) + VALUES ($1, $2) + ON CONFLICT DO NOTHING + `, + snippet.ID, + tagID, + ) if err != nil { return oops.New(err, "failed to add tag to snippet") }