]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/client.ts
Async signature and various fixes
[github/Chocobozzz/PeerTube.git] / server / controllers / client.ts
index e4d69eae7d3cc70130e8b5959e0abee28615b339..d42e8396df39be22621d0bbcbb0d540bbc506a9b 100644 (file)
@@ -8,15 +8,14 @@ import {
   CONFIG,
   REMOTE_SCHEME,
   STATIC_PATHS,
-  STATIC_MAX_AGE
+  STATIC_MAX_AGE,
+  OPENGRAPH_COMMENT
 } from '../initializers'
 import { root, readFileBufferPromise } from '../helpers'
 import { VideoInstance } from '../models'
 
 const clientsRouter = express.Router()
 
-// TODO: move to constants
-const opengraphComment = '<!-- opengraph tags -->'
 const distPath = join(root(), 'client', 'dist')
 const embedPath = join(distPath, 'standalone', 'videos', 'embed.html')
 const indexPath = join(distPath, 'index.html')
@@ -85,7 +84,7 @@ function addOpenGraphTags (htmlStringPage: string, video: VideoInstance) {
     tagsString += '<meta property="' + tagName + '" content="' + tagValue + '" />'
   })
 
-  return htmlStringPage.replace(opengraphComment, tagsString)
+  return htmlStringPage.replace(OPENGRAPH_COMMENT, tagsString)
 }
 
 function generateWatchHtmlPage (req: express.Request, res: express.Response, next: express.NextFunction) {