Merge pull request #17176 from EIrwin/patch-1
chore(backend-plugin.md) - destructure identity
This commit is contained in:
@@ -184,9 +184,10 @@ export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
const router = Router();
|
||||
const { identity } = options;
|
||||
|
||||
router.post('/example', async (req, res) => {
|
||||
const identity = await identity.getIdentity({ request: req });
|
||||
const userIdentity = await identity.getIdentity({ request: req });
|
||||
...
|
||||
});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user