ravendb
Version:
RavenDB client for Node.js
32 lines • 1.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DropSubscriptionConnectionCommand = void 0;
const RavenCommand_js_1 = require("../../Http/RavenCommand.js");
const StringUtil_js_1 = require("../../Utility/StringUtil.js");
class DropSubscriptionConnectionCommand extends RavenCommand_js_1.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_js_1.StringUtil.isNullOrEmpty(this._name)) {
uri += "?name=" + encodeURIComponent(this._name);
}
if (!StringUtil_js_1.StringUtil.isNullOrEmpty(this._workerId)) {
uri += "&workerId=" + encodeURIComponent(this._workerId);
}
return {
method: "POST",
uri
};
}
get isReadRequest() {
return false;
}
}
exports.DropSubscriptionConnectionCommand = DropSubscriptionConnectionCommand;
//# sourceMappingURL=DropSubscriptionConnectionCommand.js.map