You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with announcements search integration. It seems that search factory is not able to build index cause by lacking of API endpoint exposed by router.
I had to add this code to make it work:
export default async function createPlugin({
logger,
database,
permissions,
}: PluginEnvironment): Promise<Router> {
const announcementsContext = await buildAnnouncementsContext({
logger: logger,
database: database,
permissions: permissions
});
const router = await createRouter(announcementsContext);
// TODO: seems that there is an error in plugin
router.get(
'/',
async (
req,
res,
) => {
const list = await announcementsContext.persistenceContext.announcementsStore.announcements({});
return res.json(list.results);
},
);
return router;
}
Hi,
I have a problem with announcements search integration. It seems that search factory is not able to build index cause by lacking of API endpoint exposed by router.
I had to add this code to make it work:
plugin version: "@k-phoen/backstage-plugin-announcements-backend": "^0.2.0",
The text was updated successfully, but these errors were encountered: