Skip to content

Commit 042adfd

Browse files
committed
wip: todos
1 parent 5a76c60 commit 042adfd

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

meteor/server/api/peripheralDevice.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ peripheralDeviceRouter.post('/:deviceId/uploadCredentials', bodyParser(), async
634634
await PeripheralDevices.updateAsync(peripheralDevice._id, {
635635
$set: {
636636
'secretSettings.credentials': body,
637-
'settings.secretCredentials': true,
637+
'settings.secretCredentials': true, // nocommit - fix me
638638
},
639639
})
640640

@@ -705,7 +705,7 @@ peripheralDeviceRouter.post('/:deviceId/resetAuth', async (ctx) => {
705705
$unset: {
706706
// User credentials
707707
'secretSettings.accessToken': true,
708-
'settings.secretAccessToken': true,
708+
'settings.secretAccessToken': true, // nocommit - fix me
709709
accessTokenUrl: true,
710710
},
711711
})
@@ -735,10 +735,10 @@ peripheralDeviceRouter.post('/:deviceId/resetAppCredentials', async (ctx) => {
735735
$unset: {
736736
// App credentials
737737
'secretSettings.credentials': true,
738-
'settings.secretCredentials': true,
738+
'settings.secretCredentials': true, // nocommit - fix me
739739
// User credentials
740740
'secretSettings.accessToken': true,
741-
'settings.secretAccessToken': true,
741+
'settings.secretAccessToken': true, // nocommit - fix me
742742
accessTokenUrl: true,
743743
},
744744
})

meteor/server/api/rest/v1/studios.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ class StudiosServerAPI implements StudiosRestAPI {
240240
}
241241
await PeripheralDevices.updateAsync(deviceId, {
242242
$set: {
243-
// nocommit - this
244-
studioId,
243+
studioId, // nocommit - this
245244
},
246245
})
247246

@@ -262,7 +261,7 @@ class StudiosServerAPI implements StudiosRestAPI {
262261
)
263262
await PeripheralDevices.updateAsync(deviceId, {
264263
$unset: {
265-
studioId: 1,
264+
studioId: 1, // nocommit - this
266265
},
267266
})
268267

meteor/server/migration/1_50_0.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const addSteps = addMigrationSteps('1.50.0', [
171171
})
172172
const badObject = objects.find(
173173
(device) =>
174-
!!Object.values<unknown>((device.settings as any)?.['devices'] ?? {}).find(
174+
!!Object.values<unknown>((device as any).settings?.['devices'] ?? {}).find(
175175
(subdev: any) => !subdev?.type || !subdev?.options
176176
)
177177
)
@@ -187,7 +187,7 @@ export const addSteps = addMigrationSteps('1.50.0', [
187187
'settings.device': { $exists: true },
188188
})
189189
for (const obj of objects) {
190-
const newDevices: any = clone((obj.settings as any)?.['devices'] || {})
190+
const newDevices: any = clone((obj as any).settings?.['devices'] || {})
191191

192192
for (const [id, subdev] of Object.entries<any>(newDevices)) {
193193
if (!subdev) continue
@@ -501,7 +501,7 @@ export const addSteps = addMigrationSteps('1.50.0', [
501501

502502
const newOverrides: SomeObjectOverrideOp[] = []
503503

504-
for (const [id, subDevice] of Object.entries<unknown>((device.settings as any)?.['devices'] || {})) {
504+
for (const [id, subDevice] of Object.entries<unknown>((device as any).settings?.['devices'] || {})) {
505505
newOverrides.push(
506506
literal<ObjectOverrideSetOp>({
507507
op: 'set',
@@ -555,7 +555,7 @@ export const addSteps = addMigrationSteps('1.50.0', [
555555

556556
const newOverrides: SomeObjectOverrideOp[] = []
557557

558-
for (const [id, subDevice] of Object.entries<unknown>((device.settings as any)?.['devices'] || {})) {
558+
for (const [id, subDevice] of Object.entries<unknown>((device as any).settings?.['devices'] || {})) {
559559
newOverrides.push(
560560
literal<ObjectOverrideSetOp>({
561561
op: 'set',
@@ -609,7 +609,7 @@ export const addSteps = addMigrationSteps('1.50.0', [
609609

610610
const newOverrides: SomeObjectOverrideOp[] = []
611611

612-
for (const [id, subDevice] of Object.entries<unknown>((device.settings as any)?.['devices'] || {})) {
612+
for (const [id, subDevice] of Object.entries<unknown>((device as any).settings?.['devices'] || {})) {
613613
newOverrides.push(
614614
literal<ObjectOverrideSetOp>({
615615
op: 'set',

meteor/server/publications/peripheralDeviceForDevice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async function setupPeripheralDevicePublicationObservers(
171171
triggerUpdate({ invalidatePublication: true })
172172
},
173173
changed: (_id, fields) => {
174-
if ('studioId' in fields) studioObserver.restart()
174+
if ('studioAndConfigId' in fields) studioObserver.restart()
175175

176176
triggerUpdate({ invalidatePublication: true })
177177
},

0 commit comments

Comments
 (0)