Skip to content

Commit

Permalink
Fix the handler results
Browse files Browse the repository at this point in the history
  • Loading branch information
abbradar committed Jun 27, 2024
1 parent 309ecaa commit 5b37b7d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/EmbeddedContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ export default class EmbeddedContainer extends Vue {
},
idToken: (request: Embedded.IIDTokenRequestData) => {
if (!(this.currentAuth instanceof CurrentAuth)) {
return { result: {} };
return { result: {} }
} else {
return { result: {
idToken: this.currentAuth.idToken,
} }
return {
result: {
idToken: this.currentAuth.idToken,
},
}
}
},
})
Expand Down Expand Up @@ -259,11 +261,11 @@ export default class EmbeddedContainer extends Vue {
// FIXME: smth with the type signature.
const result = (handler as any)(request as any) as HandlerResult
if ('result' in result) {
const response: Embedded.IResponseSuccess<typeof result> = {
const response: Embedded.IResponseSuccess<typeof result.result> = {
type: 'response',
id: msg.id,
status: 'ok',
result,
result: result.result,
}
this.sendMessage(response)
} else {
Expand Down

0 comments on commit 5b37b7d

Please sign in to comment.