the statusphere demo reworked into a vite/react app in a monorepo

Switch to more consistent style

Changed files
+8 -4
src
+4 -2
TUTORIAL.md
··· 133 133 if (!session.did) return null 134 134 135 135 // "Restore" the agent for the user 136 - return await ctx.oauthClient.restore(session.did).catch(async (err) => { 136 + try { 137 + return await ctx.oauthClient.restore(session.did) 138 + } catch(err) { 137 139 ctx.logger.warn({ err }, 'oauth restore failed') 138 140 await session.destroy() 139 141 return null 140 - }) 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 - return await ctx.oauthClient.restore(session.did).catch(async (err) => { 45 + try { 46 + return await ctx.oauthClient.restore(session.did) 47 + } catch (err) { 46 48 ctx.logger.warn({ err }, 'oauth restore failed') 47 49 await session.destroy() 48 50 return null 49 - }) 51 + } 50 52 } 51 53 52 54 export const createRouter = (ctx: AppContext) => {