mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-23 23:49:50 +02:00
Name the run's owner on session.start (#362)
Adds `userId` (the box owner) to `session.start` so a host knows whose Steam sign-in plays the run. API tests: 161 pass.
This commit is contained in:
@@ -428,7 +428,8 @@ describe('GET /machine/jobs', () => {
|
||||
boxTier: 'sm',
|
||||
gameId: s.gameId,
|
||||
steamAppId: 5520,
|
||||
linkedAccountId: s.owner.linkedAccountId
|
||||
linkedAccountId: s.owner.linkedAccountId,
|
||||
userId: s.owner.userId
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -336,6 +336,11 @@ export namespace Session {
|
||||
linkedAccountId: z.string().meta({
|
||||
description: 'Which linked account is playing',
|
||||
example: Examples.Session.linkedAccountId
|
||||
}),
|
||||
userId: z.string().meta({
|
||||
description:
|
||||
'Whose run it is: the box owner, whose Steam sign-in on this host plays it',
|
||||
example: Examples.User.id
|
||||
})
|
||||
})
|
||||
.meta({
|
||||
@@ -413,7 +418,8 @@ export namespace Session {
|
||||
boxTier: row.box.tier as z.infer<typeof StartJob>['boxTier'],
|
||||
gameId: row.game.id,
|
||||
steamAppId: row.game.steamAppId,
|
||||
linkedAccountId: row.session.linkedAccountId
|
||||
linkedAccountId: row.session.linkedAccountId,
|
||||
userId: row.box.userId
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user