kopia lustrzana https://github.com/backface/turtlestitch
Merge pull request #2279 from bromagosa/rename-project
added Cloud >> updateProjectName methodpull/89/head
commit
4bf84582b0
19
src/cloud.js
19
src/cloud.js
|
@ -749,3 +749,22 @@ Cloud.prototype.updateNotes = function (
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Cloud.prototype.updateProjectName = function (
|
||||||
|
projectName,
|
||||||
|
newName,
|
||||||
|
onSuccess,
|
||||||
|
onError
|
||||||
|
) {
|
||||||
|
this.withCredentialsRequest(
|
||||||
|
'POST',
|
||||||
|
'/projects/%username/' +
|
||||||
|
encodeURIComponent(projectName) +
|
||||||
|
'/metadata',
|
||||||
|
onSuccess,
|
||||||
|
onError,
|
||||||
|
'Could not update project name',
|
||||||
|
false, // wants raw response
|
||||||
|
JSON.stringify({ projectname: newName })
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue