Merge pull request #17176 from EIrwin/patch-1

chore(backend-plugin.md) - destructure identity
This commit is contained in:
Patrik Oldsberg
2023-04-05 11:09:25 +02:00
committed by GitHub
+2 -1
View File
@@ -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 });
...
});
```