ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto
16
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(inertia): replace UserTransformer with atproto did in shared props

byarielm.fyi 21f6eb33 0f443c74

verified
+4 -5
+1 -2
app/middleware/inertia_middleware.ts
··· 1 1 import type { HttpContext } from '@adonisjs/core/http' 2 2 import type { NextFn } from '@adonisjs/core/types/http' 3 - import UserTransformer from '#transformers/user_transformer' 4 3 import BaseInertiaMiddleware from '@adonisjs/inertia/inertia_middleware' 5 4 6 5 export default class InertiaMiddleware extends BaseInertiaMiddleware { ··· 32 31 flash: ctx.inertia.always({ 33 32 error: error, 34 33 }), 35 - user: ctx.inertia.always(auth?.user ? UserTransformer.transform(auth.user) : undefined), 34 + user: ctx.inertia.always(auth?.user ? { did: auth.user.did } : undefined), 36 35 } 37 36 } 38 37
+3 -3
inertia/layouts/default.vue
··· 42 42 </div> 43 43 <div> 44 44 <nav> 45 - <template v-if="page.props.user"> 46 - <span>{{ page.props.user.initials }}</span> 47 - <Form route="session.destroy"> 45 + <template v-if="page.props.user.did"> 46 + <span>{{ page.props.user.did }}</span> 47 + <Form route="oauth.logout"> 48 48 <button type="submit">Logout</button> 49 49 </Form> 50 50 </template>