Handle tutorial walkthrough

This commit is contained in:
Johannes Zellner
2016-05-06 14:38:17 +02:00
parent 7e1055ae44
commit e413f7ba9b
5 changed files with 34 additions and 1 deletions

View File

@@ -777,6 +777,15 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
return (available - needed) >= 0;
};
Client.prototype.setShowTutorial = function (show, callback) {
var data = { showTutorial: show };
$http.put(client.apiOrigin + '/api/v1/profile/tutorial', data).success(function (data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
}
client = new Client();
return client;
}]);