tangled
alpha
login
or
join now
danabra.mov
/
statusphere-react
forked from
samuel.fm/statusphere-react
0
fork
atom
the statusphere demo reworked into a vite/react app in a monorepo
0
fork
atom
overview
issues
pulls
pipelines
Switch to more consistent style
Paul Frazee
2 years ago
b5d311ab
512dacd9
+8
-4
2 changed files
expand all
collapse all
unified
split
TUTORIAL.md
src
routes.ts
+4
-2
TUTORIAL.md
···
133
133
if (!session.did) return null
134
134
135
135
// "Restore" the agent for the user
136
136
-
return await ctx.oauthClient.restore(session.did).catch(async (err) => {
136
136
+
try {
137
137
+
return await ctx.oauthClient.restore(session.did)
138
138
+
} catch(err) {
137
139
ctx.logger.warn({ err }, 'oauth restore failed')
138
140
await session.destroy()
139
141
return null
140
140
-
})
142
142
+
}
141
143
}
142
144
```
143
145
+4
-2
src/routes.ts
···
42
42
password: env.COOKIE_SECRET,
43
43
})
44
44
if (!session.did) return null
45
45
-
return await ctx.oauthClient.restore(session.did).catch(async (err) => {
45
45
+
try {
46
46
+
return await ctx.oauthClient.restore(session.did)
47
47
+
} catch (err) {
46
48
ctx.logger.warn({ err }, 'oauth restore failed')
47
49
await session.destroy()
48
50
return null
49
49
-
})
51
51
+
}
50
52
}
51
53
52
54
export const createRouter = (ctx: AppContext) => {