remove_user.js 940 B

123456789101112131415161718192021222324252627
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.RemoveUserOperation = void 0;
  4. const responses_1 = require("../cmap/wire_protocol/responses");
  5. const command_1 = require("./command");
  6. const operation_1 = require("./operation");
  7. /** @internal */
  8. class RemoveUserOperation extends command_1.CommandOperation {
  9. constructor(db, username, options) {
  10. super(db, options);
  11. this.SERVER_COMMAND_RESPONSE_TYPE = responses_1.MongoDBResponse;
  12. this.options = options;
  13. this.username = username;
  14. }
  15. get commandName() {
  16. return 'dropUser';
  17. }
  18. buildCommandDocument(_connection) {
  19. return { dropUser: this.username };
  20. }
  21. handleOk(_response) {
  22. return true;
  23. }
  24. }
  25. exports.RemoveUserOperation = RemoveUserOperation;
  26. (0, operation_1.defineAspects)(RemoveUserOperation, [operation_1.Aspect.WRITE_OPERATION]);
  27. //# sourceMappingURL=remove_user.js.map