mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Return JSON from contents API checkpoint methods
This commit is contained in:
parent
aecb4bffa5
commit
56320588da
@ -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);
|
||||
};
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user