Skip to content

Commit

Permalink
fix(admin): getSwaggerMetadata().setExtraRouteHeaders() sec array han…
Browse files Browse the repository at this point in the history
…dling
  • Loading branch information
kon14 authored and kkopanidis committed Oct 11, 2023
1 parent 9bd2a7c commit 874fe0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/admin/src/hermes/swaggerMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ export const getSwaggerMetadata: () => SwaggerRouterMetadata = () => ({
],
setExtraRouteHeaders(route: ConduitRoute, swaggerRouteDoc: Indexable): void {
if (route.input.path !== '/login' && route.input.path !== '/modules') {
swaggerRouteDoc.security[0].adminToken = [];
swaggerRouteDoc.security = swaggerRouteDoc.security.map(
(originalSecEntry: { [field: string]: string }) => ({
...originalSecEntry,
adminToken: [],
}),
);
}
},
});

0 comments on commit 874fe0d

Please sign in to comment.