Skip to content

Commit d598bf8

Browse files
committed
format setActiveAccount method
1 parent c0a5c0a commit d598bf8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apps/workers-observability/src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,15 @@ export class ObservabilityMCP extends McpAgent<Env, State, Props> {
8484
}
8585
}
8686

87-
async setActiveAccountId(accountId: string) {
88-
try {
89-
const userDetails = getUserDetails(env, this.props.user.id)
90-
await userDetails.setActiveAccountId(accountId)
91-
} catch (e) {
92-
this.server.recordError(e)
93-
// Don't return null, as the method should return void
87+
async setActiveAccountId(accountId: string) {
88+
try {
89+
const userDetails = getUserDetails(env, this.props.user.id)
90+
await userDetails.setActiveAccountId(accountId)
91+
} catch (e) {
92+
this.server.recordError(e)
93+
}
9494
}
9595
}
96-
}
9796

9897
const ObservabilityScopes = {
9998
...RequiredScopes,
@@ -106,6 +105,7 @@ const ObservabilityScopes = {
106105
export default new OAuthProvider({
107106
apiRoute: '/sse',
108107
apiHandler: ObservabilityMCP.mount('/sse'),
108+
// @ts-ignore
109109
defaultHandler: createAuthHandlers({ scopes: ObservabilityScopes, metrics }),
110110
authorizeEndpoint: '/oauth/authorize',
111111
tokenEndpoint: '/token',

0 commit comments

Comments
 (0)