Skip to content

Commit bd8f08c

Browse files
committed
chore: comments
1 parent 79da40a commit bd8f08c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operations/search_indexes/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface SearchIndexDescription extends Document {
2222
}
2323

2424
/** @internal */
25-
export class CreateSearchIndexesOperation extends ModernizedOperation<string[]> {
25+
export class CreateSearchIndexesOperation extends ModernizedOperation<Document> {
2626
override SERVER_COMMAND_RESPONSE_TYPE = MongoDBResponse;
2727
private readonly collection: Collection;
2828
private readonly descriptions: ReadonlyArray<SearchIndexDescription>;
@@ -47,7 +47,7 @@ export class CreateSearchIndexesOperation extends ModernizedOperation<string[]>
4747
}
4848

4949
override handleOk(response: InstanceType<typeof this.SERVER_COMMAND_RESPONSE_TYPE>): string[] {
50-
return response.toObject(this.bsonOptions).indexesCreated.map((val: { name: any }) => val.name);
50+
return super.handleOk(response).indexesCreated.map((val: { name: any }) => val.name);
5151
}
5252

5353
override buildOptions(timeoutContext: TimeoutContext): ServerCommandOptions {

0 commit comments

Comments
 (0)