Skip to content

Commit

Permalink
fix: 修复当文件生成失败时无法进行编辑的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Jan 14, 2024
1 parent d85e040 commit 595e50f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.54",
"version": "2.14.55",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
2 changes: 1 addition & 1 deletion src/api/files/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function useFilesApi() {
method: 'get',
});
},
getOneFile: (name: string): AxiosPromise<MyAxiosRes> => {
getFile: (name: string): AxiosPromise<MyAxiosRes> => {
return request({
url: `/api/file/${encodeURIComponent(name)}`,
method: 'get',
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ router.beforeResolve(async to => {
} else if (to.params.editType === 'collections') {
await useSubsApi().getOne('collection', name);
}else if (to.params.editType === 'files') {
await useFilesApi().getOneFile(name);
await useFilesApi().getWholeFile(name);
}
} catch {
router.replace('/404');
Expand Down

0 comments on commit 595e50f

Please sign in to comment.