ravendb
Version:
RavenDB client for Node.js
28 lines • 899 B
JavaScript
import { RavenCommand } from "../../Http/RavenCommand.js";
import { StringUtil } from "../../Utility/StringUtil.js";
export class DropSubscriptionConnectionCommand extends RavenCommand {
_name;
_workerId;
constructor(name, workerId) {
super();
this._name = name;
this._workerId = workerId;
}
createRequest(node) {
let uri = node.url + "/databases/" + node.database + "/subscriptions/drop";
if (!StringUtil.isNullOrEmpty(this._name)) {
uri += "?name=" + encodeURIComponent(this._name);
}
if (!StringUtil.isNullOrEmpty(this._workerId)) {
uri += "&workerId=" + encodeURIComponent(this._workerId);
}
return {
method: "POST",
uri
};
}
get isReadRequest() {
return false;
}
}
//# sourceMappingURL=DropSubscriptionConnectionCommand.js.map