From d1105b97ef0b18626ad3b91e80b03d477baff8c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 1 Oct 2018 13:29:38 +0200 Subject: Fix dnt route --- scripts/build/server.sh | 2 +- server/controllers/static.ts | 2 +- server/initializers/checker-after-init.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build/server.sh b/scripts/build/server.sh index bd4d1bf47..8a1d4ca9a 100755 --- a/scripts/build/server.sh +++ b/scripts/build/server.sh @@ -5,4 +5,4 @@ set -eu rm -rf ./dist npm run tsc -cp -r "./server/static" "./dist" +cp -r "./server/static" "./dist/server" diff --git a/server/controllers/static.ts b/server/controllers/static.ts index baafe1ac4..75e30353c 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -120,7 +120,7 @@ staticRouter.use('/.well-known/dnt-policy.txt', (_, res: express.Response) => { res.type('text/plain') - return res.sendFile(join(root(), 'server/static/dnt-policy/dnt-policy-1.0.txt')) + return res.sendFile(join(root(), 'dist/server/static/dnt-policy/dnt-policy-1.0.txt')) } ) diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index 588526235..72d846957 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts @@ -1,5 +1,5 @@ import * as config from 'config' -import { promisify0, isProdInstance, parseDuration, isTestInstance } from '../helpers/core-utils' +import { isProdInstance, isTestInstance } from '../helpers/core-utils' import { UserModel } from '../models/account/user' import { ApplicationModel } from '../models/application/application' import { OAuthClientModel } from '../models/oauth/oauth-client' @@ -7,7 +7,7 @@ import { parse } from 'url' import { CONFIG } from './constants' import { logger } from '../helpers/logger' import { getServerActor } from '../helpers/utils' -import { RecentlyAddedStrategy, VideosRedundancy } from '../../shared/models/redundancy' +import { RecentlyAddedStrategy } from '../../shared/models/redundancy' import { isArray } from '../helpers/custom-validators/misc' import { uniq } from 'lodash' -- cgit v1.2.3