Skip to content

Commit aa0c85b

Browse files
committed
typing issue ObjectID vs Id
1 parent 4e7293c commit aa0c85b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

backend/src/controllers/attachments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Request, Response} from 'express';
22
import JSZip from 'jszip';
33
import moment from 'moment';
4-
import {ObjectID, Db} from 'mongodb';
4+
import {ObjectID} from 'mongodb';
55
import {IAttachmentCollection, IAttachmentModelConfig, attachmentModelsConfig, IAttachments} from '../models/attachments';
66
import {CollectionNames, SocketEventTypes} from '../models/common';
77
import {IInvoice} from '../models/invoices';

backend/src/controllers/tests/1-clients.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { Request, Response } from 'express';
66
import { ConfacRequest } from '../../models/technical';
77
import { IAudit } from '../../models/common';
8-
import { ObjectID } from 'mongodb'
98
import { IClient } from '../../models/clients'
109
import { Jwt } from '../../models/technical'
1110
import { saveClient } from '../clients';

backend/src/controllers/utils/entity-events.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import {ObjectID} from 'bson';
1+
import {ObjectId} from 'bson';
22
import {CollectionNames, SocketEventTypes} from '../../models/common';
33
import {ConfacRequest} from '../../models/technical';
44

55
export function emitEntityEvent(
66
req: ConfacRequest,
77
eventType: SocketEventTypes,
88
entityType: CollectionNames,
9-
entityId: ObjectID | null,
9+
entityId: ObjectId | null,
1010
entity: any | null,
1111
sendTo: 'everyone' | 'others' = 'others',
1212
) {
@@ -25,7 +25,7 @@ export function emitEntityEvent(
2525
interface EntityEventPayload {
2626
entityType: string;
2727
entity: any;
28-
entityId: ObjectID | null;
28+
entityId: ObjectId | null;
2929
sourceSocketId: string | undefined;
3030
sourceUserAlias: string | undefined;
3131
}

0 commit comments

Comments
 (0)