Add a warning to the deprecated non-eventsource sync endpoint
Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
This commit is contained in:
@@ -127,6 +127,9 @@ export async function createRouter({
|
||||
await docsSynchronizer.doSync(
|
||||
() => {
|
||||
if (req.header('accept') !== 'text/event-stream') {
|
||||
console.warn(
|
||||
"The /sync/:namespace/:kind/:name endpoint but the call wasn't done by an EventSource. This behavior is deprecated and will be removed soon. Make sure to update the @backstage/plugin-techdocs package in the frontend to the latest version.",
|
||||
);
|
||||
return createHttpResponse(res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user