Skip to content
Snippets Groups Projects
Commit 43b08f1d authored by Andrey Azov's avatar Andrey Azov
Browse files

Update the path for fetching images

parent f5b847d7
No related branches found
No related tags found
No related merge requests found
Pipeline #129369 passed with stages
in 1 minute and 53 seconds
......@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"clean": "rm -rf ./build",
"dev": "ts-node-dev --respawn --transpileOnly src/server/index.ts",
"dev": "ts-node-dev --respawn --transpile-only src/server/index.ts",
"prebuild": "npm run clean && mkdirp build",
"build": "npm run build-docs && npm run build-server",
"build-docs": "NODE_ENV=build-docs ts-node ./src/build-scripts/index.ts",
......
......@@ -18,10 +18,10 @@ const imageVisitor = (filePath: string) => (node: Node) => {
.split('/')
.slice(0, -1)
.join('/');
const destPath = `/api/images/${markdownDirectory}/${node.url}`;
const destPath = `/help-api/images/${markdownDirectory}/${node.url}`;
const { host } = config;
node.url = `${host}${destPath}`;
const { host, isProduction } = config;
node.url = isProduction ? destPath : `${host}${destPath}`;
};
export default attacher;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment