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",