From d0d49051ac032fcc1555591ba5095bdefca7d7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 27 Aug 2021 12:08:26 +0200 Subject: [PATCH] Revert "fix: oas being overriden" This reverts commit e03bac9e6411430a3158283f6fc830ed11fb388b. --- package.json | 3 +-- src/lib/app.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a1efff3aa7..4039c9cacb 100644 --- a/package.json +++ b/package.json @@ -30,13 +30,12 @@ "prestart:dev": "yarn run clean", "start:dev": "NODE_ENV=development tsc-watch --onSuccess \"node dist/server-dev.js\"", "copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/", - "copy-docs": "copyfiles -u 1 websitev2/docs/api/oas/* dist", "db-migrate": "db-migrate --migrations-dir ./src/migrations", "lint": "eslint ./src", "prebuild:watch": "yarn run clean", "build:watch": "tsc -w", "prebuild": "yarn run clean", - "build": "yarn run copy-docs && yarn run copy-templates && tsc --pretty", + "build": "yarn run copy-templates && tsc --pretty", "prepare": "yarn run build", "test": "NODE_ENV=test PORT=4243 jest", "test:docker": "./scripts/docker-postgres.sh", diff --git a/src/lib/app.ts b/src/lib/app.ts index eed837e836..09e93d80b7 100644 --- a/src/lib/app.ts +++ b/src/lib/app.ts @@ -74,8 +74,7 @@ export default function getApp( app.use(baseUriPath, express.static(publicFolder, { index: false })); if (config.enableOAS) { - const oasPath = path.resolve(__dirname, '../docs/api/oas'); - app.use(`${baseUriPath}/oas`, express.static(oasPath)); + app.use(`${baseUriPath}/oas`, express.static('docs/api/oas')); } switch (config.authentication.type) { case IAuthType.OPEN_SOURCE: {