Skip to content

Commit

Permalink
Problem corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
Marnalas committed Jan 11, 2025
1 parent 542c840 commit 7484555
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ var previewRename = function (args, host, headers, fileInfo, config) { return __
})];
case 1:
response = _a.sent();
args.jobLog(JSON.stringify(response.data));
return [2 /*return*/, config.getFileToRename(response.data, fileInfo)];
return [2 /*return*/, config.getFileToRename(response, fileInfo)];
case 2:
error_1 = _a.sent();
throw new Error("Failed to preview rename: ".concat(error_1.message));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,13 @@ const previewRename = async (
config: IArrConfig,
): Promise<IFileToRename | undefined> => {
try {
const response = await args.deps.axios({
const response: IPreviewRenameResponse = await args.deps.axios({
method: 'get',
url: config.buildPreviewRenameUrl(fileInfo, host),
headers,
});
args.jobLog(JSON.stringify(response.data));

return config.getFileToRename(response.data, fileInfo);
return config.getFileToRename(response, fileInfo);
} catch (error) {
throw new Error(`Failed to preview rename: ${(error as Error).message}`);
}
Expand Down

0 comments on commit 7484555

Please sign in to comment.