UNPKG

@configurator/ravendb

Version:
30 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DropSubscriptionConnectionCommand = void 0; const RavenCommand_1 = require("../../Http/RavenCommand"); const StringUtil_1 = require("../../Utility/StringUtil"); class DropSubscriptionConnectionCommand extends RavenCommand_1.RavenCommand { constructor(name, workerId) { super(); this._name = name; this._workerId = workerId; } createRequest(node) { let uri = node.url + "/databases/" + node.database + "/subscriptions/drop"; if (!StringUtil_1.StringUtil.isNullOrEmpty(this._name)) { uri += "?name=" + encodeURIComponent(this._name); } if (!StringUtil_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