Skip to content

Commit 3eb0f4a

Browse files
committed
chore: fix type errors
1 parent a2d73db commit 3eb0f4a

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

meteor/server/publications/studio.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
PeripheralDevicePubSub,
3737
PeripheralDevicePubSubCollectionsNames,
3838
} from '@sofie-automation/shared-lib/dist/pubsub/peripheralDevice'
39-
import { PackageInfoDB } from '@sofie-automation/corelib/dist/dataModel/PackageInfos'
4039

4140
meteorPublish(CorelibPubSub.studios, async function (studioIds: StudioId[] | null, token: string | undefined) {
4241
check(studioIds, Match.Maybe(Array))
@@ -118,13 +117,11 @@ meteorPublish(
118117
}
119118
)
120119

121-
meteorPublish(CorelibPubSub.packageInfos, async function (deviceId, token) {
120+
meteorPublish(CorelibPubSub.packageInfos, async function (deviceId: PeripheralDeviceId, token: string | undefined) {
122121
if (!deviceId) throw new Meteor.Error(400, 'deviceId argument missing')
123-
const modifier: FindOptions<PackageInfoDB> = {
124-
fields: {},
125-
}
122+
126123
if (await PeripheralDeviceReadAccess.peripheralDeviceContent(deviceId, { userId: this.userId, token })) {
127-
return PackageInfos.findWithCursor({ deviceId }, modifier)
124+
return PackageInfos.findWithCursor({ deviceId })
128125
}
129126
return null
130127
})

packages/corelib/src/pubsub.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
SegmentPlayoutId,
4444
ShowStyleVariantId,
4545
} from './dataModel/Ids'
46-
import { PackageInfoDB } from '@sofie-automation/corelib/src/dataModel/PackageInfos'
46+
import { PackageInfoDB } from './dataModel/PackageInfos'
4747

4848
/**
4949
* Ids of possible DDP subscriptions for any the UI and gateways accessing the Rundown & RundownPlaylist model.
@@ -333,7 +333,7 @@ export interface CorelibPubSubTypes {
333333
studioIds: StudioId[],
334334
token?: string
335335
) => CollectionName.PackageContainerStatuses
336-
[CorelibPubSub.packageInfos]: (deviceId: PeripheralDeviceId, token?: string) => PackageInfoDB
336+
[CorelibPubSub.packageInfos]: (deviceId: PeripheralDeviceId, token?: string) => CollectionName.PackageInfos
337337
}
338338

339339
export type CorelibPubSubCollections = {
@@ -349,6 +349,7 @@ export type CorelibPubSubCollections = {
349349
[CollectionName.IngestDataCache]: IngestDataCacheObj
350350
[CollectionName.PartInstances]: DBPartInstance
351351
[CollectionName.PackageContainerStatuses]: PackageContainerStatusDB
352+
[CollectionName.PackageInfos]: PackageInfoDB
352353
[CollectionName.Parts]: DBPart
353354
[CollectionName.PeripheralDevices]: PeripheralDevice
354355
[CollectionName.PieceInstances]: PieceInstance

0 commit comments

Comments
 (0)