This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1010 "packageManager" : " pnpm@8.15.6" ,
1111 "dependencies" : {
1212 "@tegonhq/sdk" : " ^0.1.3" ,
13- "@trigger.dev/sdk" : " 3.0.0-beta.55 " ,
13+ "@trigger.dev/sdk" : " 3.0.0-beta.56 " ,
1414 "axios" : " ^1.6.7" ,
1515 "form-data" : " ^4.0.0"
1616 },
Original file line number Diff line number Diff line change @@ -34,17 +34,17 @@ export const prepareTriggerPayload = async (
3434 prisma : PrismaService ,
3535 actionId : string ,
3636) => {
37- const action = await prisma . action . findFirst ( {
37+ const action = await prisma . action . findUnique ( {
3838 where : {
3939 id : actionId ,
4040 } ,
4141 } ) ;
4242
43- const actionUser = await prisma . user . findFirst ( {
44- where : { username : action . slug } ,
43+ const actionUser = await prisma . usersOnWorkspaces . findFirst ( {
44+ where : { workspaceId : action . workspaceId , user : { username : action . slug } } ,
4545 } ) ;
4646
47- const accessToken = await generateKeyForUserId ( actionUser . id ) ;
47+ const accessToken = await generateKeyForUserId ( actionUser . userId ) ;
4848
4949 const integrationMap = await getIntegrationAccountsFromActions (
5050 prisma ,
Original file line number Diff line number Diff line change @@ -88,8 +88,11 @@ export default class WebhookService {
8888
8989 // TODO (actons): Send all integration accounts based on the ask
9090 actionEntities . map ( async ( actionEntity : ActionEntity ) => {
91- const actionUser = await this . prisma . user . findFirst ( {
92- where : { username : actionEntity . action . slug } ,
91+ const actionUser = await this . prisma . usersOnWorkspaces . findFirst ( {
92+ where : {
93+ workspaceId : actionEntity . action . workspaceId ,
94+ user : { username : actionEntity . action . slug } ,
95+ } ,
9396 } ) ;
9497 const accessToken = await generateKeyForUserId ( actionUser . id ) ;
9598
You can’t perform that action at this time.
0 commit comments