Bazaar-backend: Add user entity field to members table
A new field has been added to the members table. When a user has requested to be added to a project the "identityApi" is used to get the entity ref of the user. Signed-off-by: Niklas Aronsson <niklasar@axis.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
'@backstage/plugin-bazaar-backend': minor
|
||||
---
|
||||
|
||||
**BREAKING** The bazaar-backend createRouter now requires that the `identityApi` is passed to the router.
|
||||
|
||||
These changes are **required** to `packages/backend/src/plugins/bazaar.ts`
|
||||
|
||||
The user entity ref is now added to the members table and is taken from the requesting user using the `identityApi`.
|
||||
|
||||
```diff
|
||||
import { PluginEnvironment } from '../types';
|
||||
import { createRouter } from '@backstage/plugin-bazaar-backend';
|
||||
import { Router } from 'express';
|
||||
|
||||
export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
): Promise<Router> {
|
||||
return await createRouter({
|
||||
logger: env.logger,
|
||||
config: env.config,
|
||||
database: env.database,
|
||||
+ identity: env.identity,
|
||||
});
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user