diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-22 20:58:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-25 17:32:16 +0200 |
commit | e02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch) | |
tree | b7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/controllers/client.ts | |
parent | 65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff) | |
download | PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip |
Type models
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r-- | server/controllers/client.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index aaa04889a..ce5608c9b 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -6,20 +6,21 @@ import expressValidator = require('express-validator') | |||
6 | // TODO: use .validator when express-validator typing will have validator field | 6 | // TODO: use .validator when express-validator typing will have validator field |
7 | const validator = expressValidator['validator'] | 7 | const validator = expressValidator['validator'] |
8 | 8 | ||
9 | const db = require('../initializers/database') | 9 | import { database as db } from '../initializers/database' |
10 | import { | 10 | import { |
11 | CONFIG, | 11 | CONFIG, |
12 | REMOTE_SCHEME, | 12 | REMOTE_SCHEME, |
13 | STATIC_PATHS, | 13 | STATIC_PATHS, |
14 | STATIC_MAX_AGE | 14 | STATIC_MAX_AGE |
15 | } from '../initializers' | 15 | } from '../initializers' |
16 | import { root } from '../helpers' | ||
16 | 17 | ||
17 | const clientsRouter = express.Router() | 18 | const clientsRouter = express.Router() |
18 | 19 | ||
19 | // TODO: move to constants | 20 | // TODO: move to constants |
20 | const opengraphComment = '<!-- opengraph tags -->' | 21 | const opengraphComment = '<!-- opengraph tags -->' |
21 | const distPath = join(__dirname, '..', '..', 'client/dist') | 22 | const distPath = join(root(), 'client', 'dist') |
22 | const embedPath = join(distPath, 'standalone/videos/embed.html') | 23 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
23 | const indexPath = join(distPath, 'index.html') | 24 | const indexPath = join(distPath, 'index.html') |
24 | 25 | ||
25 | // Special route that add OpenGraph tags | 26 | // Special route that add OpenGraph tags |