remove_user.js 793 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.RemoveUserOperation = void 0;
  4. const command_1 = require("./command");
  5. const operation_1 = require("./operation");
  6. /** @internal */
  7. class RemoveUserOperation extends command_1.CommandOperation {
  8. constructor(db, username, options) {
  9. super(db, options);
  10. this.options = options;
  11. this.username = username;
  12. }
  13. execute(server, session, callback) {
  14. super.executeCommand(server, session, { dropUser: this.username }, err => {
  15. callback(err, err ? false : true);
  16. });
  17. }
  18. }
  19. exports.RemoveUserOperation = RemoveUserOperation;
  20. (0, operation_1.defineAspects)(RemoveUserOperation, [operation_1.Aspect.WRITE_OPERATION]);
  21. //# sourceMappingURL=remove_user.js.map