Fixed progress + new path + combined new

Co-Authored-By: Ajay Thapliyal <ajaythapliyal1703@gmail.com>
This commit is contained in:
Alex
2023-03-19 14:38:29 +00:00
parent 7dcbed644a
commit 796b4899aa
4 changed files with 40 additions and 31 deletions

View File

@@ -13,17 +13,20 @@ export function fetchAnswerApi(
namePath = '.project';
}
const docPath =
selectedDocs.name === 'default'
? 'default'
: selectedDocs.language +
'/' +
namePath +
'/' +
selectedDocs.version +
'/' +
selectedDocs.model +
'/';
let docPath = 'default';
if (selectedDocs.location === 'local') {
docPath = 'local' + '/' + selectedDocs.name + '/';
} else if (selectedDocs.location === 'remote') {
docPath =
selectedDocs.language +
'/' +
namePath +
'/' +
selectedDocs.version +
'/' +
selectedDocs.model +
'/';
}
return fetch(apiHost + '/api/answer', {
method: 'POST',