diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index e25dc762fe..54aaefb4b7 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11601,13 +11601,12 @@ var process=require("__browserify_process");(function() { return task; }, addTag: function(req, cb) { - var name; - name = req.body.name; if (user.tags == null) { user.tags = []; } user.tags.push({ - name: name + name: req.body.name, + id: req.body.id || api.uuid() }); return typeof cb === "function" ? cb(null, user.tags) : void 0; }, diff --git a/script/index.coffee b/script/index.coffee index c9deddf5e6..50a9f98b14 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -505,9 +505,10 @@ api.wrap = (user, main=true) -> # ------ addTag: (req, cb) -> - {name} = req.body user.tags ?= [] - user.tags.push({name}) + user.tags.push + name: req.body.name + id: req.body.id or api.uuid() cb? null, user.tags updateTag: (req, cb) ->