User blog:Taldin/Bug Workaround of the Day: Deleting Unwanted Tags

Heya, Habiteers. Right now there's a bug (https://github.com/HabitRPG/habitrpg/issues/4072) that when you delete a tag inside HabitRPG, the deletion doesn't stick. While they're working on an official fix, here's the unofficial one using the scary-but-awesome HabitRPG SwaggerUI.

If working with query code is something that makes you nervous, just wait for the developers to fix it. If you want those tags gone right away, though, follow along.

Step 1. Get your User ID and  API token from HabitsRPG.
This is in the Settings menu, (aka 'the gear button').

Step 2. Once you click on the API option, you'll be taken to a screen that has your API tokens on it.
There are two of them you'll need.

Step 3. O pen a new tab to the HabitRPG  SwaggerUI  .
''' Fill in your UserID and API token in the relevant spot. '''

 

Step 4. Run the GET /user Info function.
Scroll down to where it says User and click on that link.

The User list will expand into a whole bunch of operations, but we're only interested in two of them:



GET /user and DELETE /user/tags/{ID}. Start by running the GET User command. Click the blue GET /user button, then click the Try it Out button. Your entire user account object will be returned as the response.

Step 5. Find the Tag ID
Using your brower's Find functionality, in the server response, find the name of the tag you want to delete. (For example, I searched on 'morning.')



Step 6: Delete the Tag by its ID
Copy the ID associated with the tag without the quotes, then scroll down to the DELETE /user/tags/{ID} function and click on it to open it. Paste the ID in that field and ckick 'Try It Out.'

The response should be a list of your tags that are left. Reload your HabitsRPG page. The tag should be gone.