Spaces:
Runtime error
Runtime error
Download static/node_modules/mongodb/src/operations/remove_user.ts from kaab4321/NarrativeFlow: direct link, hf CLI and curl.
- Browser
- Download file 964 Bytes
-
https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongodb/src/operations/remove_user.ts
- Command line
-
hf download hf://spaces/kaab4321/NarrativeFlow/static/node_modules/mongodb/src/operations/remove_user.ts
-
curl -L -o remove_user.ts https://huggingface.co/spaces/kaab4321/NarrativeFlow/resolve/main/static/node_modules/mongodb/src/operations/remove_user.ts
964 Bytes
| import type { Db } from '../db'; | |
| import type { Server } from '../sdam/server'; | |
| import type { ClientSession } from '../sessions'; | |
| import { CommandOperation, type CommandOperationOptions } from './command'; | |
| import { Aspect, defineAspects } from './operation'; | |
| /** @public */ | |
| export type RemoveUserOptions = CommandOperationOptions; | |
| /** @internal */ | |
| export class RemoveUserOperation extends CommandOperation<boolean> { | |
| override options: RemoveUserOptions; | |
| username: string; | |
| constructor(db: Db, username: string, options: RemoveUserOptions) { | |
| super(db, options); | |
| this.options = options; | |
| this.username = username; | |
| } | |
| override get commandName() { | |
| return 'dropUser' as const; | |
| } | |
| override async execute(server: Server, session: ClientSession | undefined): Promise<boolean> { | |
| await super.executeCommand(server, session, { dropUser: this.username }); | |
| return true; | |
| } | |
| } | |
| defineAspects(RemoveUserOperation, [Aspect.WRITE_OPERATION]); | |