Review feedback.

Signed-off-by: Eric Peterson <i.am@eric.pe>
This commit is contained in:
Eric Peterson
2021-12-05 16:50:09 -06:00
parent dcabc18f7e
commit ef600b3c8c
5 changed files with 17 additions and 14 deletions
@@ -127,15 +127,17 @@ export class LocalPublish implements PublisherBase {
// Generate publish response.
const techdocsApiUrl = await this.discovery.getBaseUrl('techdocs');
const objects = (await getFileTreeRecursively(publishDir)).map(abs => {
return abs.split(`${staticDocsDir}/`)[1];
});
const publishedFilePaths = (await getFileTreeRecursively(publishDir)).map(
abs => {
return abs.split(`${staticDocsDir}/`)[1];
},
);
return {
remoteUrl: `${techdocsApiUrl}/static/docs/${encodeURIComponent(
entity.metadata.name,
)}`,
objects,
objects: publishedFilePaths,
};
}