Return JSON from contents API checkpoint methods

This commit is contained in:
Thomas Kluyver 2014-11-13 12:20:53 -08:00
parent aecb4bffa5
commit 56320588da
2 changed files with 3 additions and 2 deletions

View File

@ -2341,7 +2341,6 @@ define([
* @param {Object} data JSON representation of a checkpoint
*/
Notebook.prototype.list_checkpoints_success = function (data) {
data = $.parseJSON(data);
this.checkpoints = data;
if (data.length) {
this.last_checkpoint = data[data.length - 1];
@ -2373,7 +2372,6 @@ define([
* @param {Object} data JSON representation of a checkpoint
*/
Notebook.prototype.create_checkpoint_success = function (data) {
data = $.parseJSON(data);
this.add_checkpoint(data);
this.events.trigger('checkpoint_created.Notebook', data);
};

View File

@ -183,6 +183,7 @@ define([
var url = this.api_url(path, 'checkpoints');
var settings = {
type : "POST",
dataType : "json",
};
return utils.promising_ajax(url, settings);
};
@ -191,6 +192,8 @@ define([
var url = this.api_url(path, 'checkpoints');
var settings = {
type : "GET",
cache: false,
dataType: "json",
};
return utils.promising_ajax(url, settings);
};