kopia lustrzana https://github.com/backface/turtlestitch
added updateNotes query
rodzic
137f5d019f
commit
1cc3595781
16
cloud.js
16
cloud.js
|
@ -142,8 +142,8 @@ Cloud.prototype.request = function (
|
|||
if (onError) {
|
||||
onError.call(
|
||||
null,
|
||||
myself.url,
|
||||
errorMsg || Cloud.genericErrorMessage
|
||||
errorMsg || Cloud.genericErrorMessage,
|
||||
myself.url
|
||||
);
|
||||
} else {
|
||||
myself.genericError();
|
||||
|
@ -474,4 +474,16 @@ Cloud.prototype.unpublishProject = function (projectName, onSuccess, onError) {
|
|||
);
|
||||
};
|
||||
|
||||
Cloud.prototype.updateNotes = function (projectName, notes, onSuccess, onError) {
|
||||
this.withCredentialsRequest(
|
||||
'POST',
|
||||
'/projects/%username/' + projectName + '/metadata',
|
||||
onSuccess,
|
||||
onError,
|
||||
'Could not update project notes',
|
||||
false, // wants raw response
|
||||
JSON.stringify({ notes: notes })
|
||||
);
|
||||
};
|
||||
|
||||
var SnapCloud = new Cloud('http://localhost:8080');
|
||||
|
|
Ładowanie…
Reference in New Issue