Skip to content

Commit

Permalink
more restrictive return
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed May 14, 2024
1 parent f4d1e77 commit d32eb9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/server/models/raw/Integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class IntegrationsRaw extends BaseRaw<IIntegration> implements IIntegrati
return this.updateMany({ userId }, { $set: { enabled: false } });
}

findByUserId(userId: IIntegration['userId']): FindCursor<IIntegration> {
findByUserId(userId: IIntegration['userId']): FindCursor<Pick<IIntegration, '_id'>> {
return this.find({ userId }, { projection: { _id: 1 } });
}

Expand Down
2 changes: 1 addition & 1 deletion packages/model-typings/src/models/IIntegrationsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { IBaseModel } from './IBaseModel';
export interface IIntegrationsModel extends IBaseModel<IIntegration> {
disableByUserId(userId: IIntegration['userId']): ReturnType<IBaseModel<IIntegration>['updateMany']>;
findByChannels(channels: IIntegration['channel']): FindCursor<IIntegration>;
findByUserId(userId: IIntegration['userId']): FindCursor<IIntegration>;
findByUserId(userId: IIntegration['userId']): FindCursor<Pick<IIntegration, '_id'>>;
findOneByIdAndCreatedByIfExists(params: { _id: IIntegration['_id']; createdBy?: IUser['_id'] }): Promise<IIntegration | null>;
findOneByUrl(url: string): Promise<IIntegration | null>;
updateRoomName(oldRoomName: string, newRoomName: string): ReturnType<IBaseModel<IIntegration>['updateMany']>;
Expand Down

0 comments on commit d32eb9a

Please sign in to comment.