##// END OF EJS Templates
Return JSON from contents API checkpoint methods
Thomas Kluyver -
Show More
@@ -2341,7 +2341,6 b' define(['
2341 * @param {Object} data JSON representation of a checkpoint
2341 * @param {Object} data JSON representation of a checkpoint
2342 */
2342 */
2343 Notebook.prototype.list_checkpoints_success = function (data) {
2343 Notebook.prototype.list_checkpoints_success = function (data) {
2344 data = $.parseJSON(data);
2345 this.checkpoints = data;
2344 this.checkpoints = data;
2346 if (data.length) {
2345 if (data.length) {
2347 this.last_checkpoint = data[data.length - 1];
2346 this.last_checkpoint = data[data.length - 1];
@@ -2373,7 +2372,6 b' define(['
2373 * @param {Object} data JSON representation of a checkpoint
2372 * @param {Object} data JSON representation of a checkpoint
2374 */
2373 */
2375 Notebook.prototype.create_checkpoint_success = function (data) {
2374 Notebook.prototype.create_checkpoint_success = function (data) {
2376 data = $.parseJSON(data);
2377 this.add_checkpoint(data);
2375 this.add_checkpoint(data);
2378 this.events.trigger('checkpoint_created.Notebook', data);
2376 this.events.trigger('checkpoint_created.Notebook', data);
2379 };
2377 };
@@ -183,6 +183,7 b' define(['
183 var url = this.api_url(path, 'checkpoints');
183 var url = this.api_url(path, 'checkpoints');
184 var settings = {
184 var settings = {
185 type : "POST",
185 type : "POST",
186 dataType : "json",
186 };
187 };
187 return utils.promising_ajax(url, settings);
188 return utils.promising_ajax(url, settings);
188 };
189 };
@@ -191,6 +192,8 b' define(['
191 var url = this.api_url(path, 'checkpoints');
192 var url = this.api_url(path, 'checkpoints');
192 var settings = {
193 var settings = {
193 type : "GET",
194 type : "GET",
195 cache: false,
196 dataType: "json",
194 };
197 };
195 return utils.promising_ajax(url, settings);
198 return utils.promising_ajax(url, settings);
196 };
199 };
General Comments 0
You need to be logged in to leave comments. Login now