Update to use promise router, which doesn't throw.
Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
a71d26fabf
commit
57cd529ba9
@@ -24,7 +24,8 @@ import {
|
||||
} from '@backstage/catalog-model';
|
||||
import { Config } from '@backstage/config';
|
||||
import { NotFoundError, serializeError } from '@backstage/errors';
|
||||
import express, { Router } from 'express';
|
||||
import express from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import { Logger } from 'winston';
|
||||
import yn from 'yn';
|
||||
import { z } from 'zod';
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "workspace:^",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
"json-schema-to-ts": "^2.6.2",
|
||||
"openapi-types": "^12.1.0",
|
||||
"openapi3-ts": "^3.1.2",
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import express, { Router } from 'express';
|
||||
import express from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import { ApiRouter, DeepWriteable } from './router';
|
||||
import doc from './schema/petstore';
|
||||
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
export type { ApiRouter } from './router';
|
||||
export type { ApiRouter, DeepWriteable } from './router';
|
||||
export * from './types';
|
||||
|
||||
Reference in New Issue
Block a user