fixed deleting
This commit is contained in:
parent
e8392eff7a
commit
61a2199fe3
4 changed files with 14 additions and 7 deletions
|
@ -503,8 +503,13 @@ function(jQuery, APICalls, URI, HostApp, Markdown) {
|
|||
Core.prototype.remove = function(id, callback, type) {
|
||||
type = type || "post";
|
||||
if (confirm("Really delete this " + type + "?")) {
|
||||
var url = URI(APICalls.mkApiRootPath("/posts/" + id));
|
||||
APICalls.http_call(url.toString(), "DELETE", callback);
|
||||
|
||||
var entity = HostApp.stringForKey("entity");
|
||||
var url = HostApp.serverUrl("post")
|
||||
.replace(/\{entity\}/, encodeURIComponent(entity))
|
||||
.replace(/\{post\}/, id);
|
||||
|
||||
APICalls.delete(url, { callback: callback });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue