From 3157f8cf53187354ba25f4aff6a7b8d42c429aa2 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 11 Dec 2014 11:16:05 +0100 Subject: [PATCH] improved tag creation --- js/AppAPI.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/AppAPI.js b/js/AppAPI.js index 7631fb3..620370c 100644 --- a/js/AppAPI.js +++ b/js/AppAPI.js @@ -309,12 +309,15 @@ var AppAPI = (function() { * Creates a new tag * * @param {String} tag JSON object with the tag to create, must contain tagTypeId and name properties - * @param {Function} callback function(Boolean) + * @param {Function} succcess function({Tag}) Callback called when the tag is created, argument is the new tag + * @param {Function} error function({Tag}) Callback called if something goes wrong, argument is an error message */ - Api.prototype.createTag = function(tag, callback) { + Api.prototype.createTag = function(tag, success, error) { this.request('tag-create', { - tag: tag - }, callback); + tag: tag, + success: success, + error: error + }); }; /**