Skip to content

Commit a28dfd4

Browse files
committed
feat: update download function to accept filename parameter for example operator
1 parent 5cb75fb commit a28dfd4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend/src/pages/OperatorMarket/Home/OperatorMarket.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function OperatorMarketPage() {
6161
};
6262

6363
const handleDownload = async () => {
64-
await downloadExampleOperatorUsingGet();
64+
await downloadExampleOperatorUsingGet("test_operator.tar");
6565
message.success("文件下载成功");
6666
};
6767

frontend/src/pages/OperatorMarket/operator.api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export function uploadOperatorChunkUsingPost(_, data: FormData, config?: any) {
4949
});
5050
}
5151

52-
export function downloadExampleOperatorUsingGet() {
53-
return download("/api/operators/examples/download");
52+
export function downloadExampleOperatorUsingGet(fileName: string) {
53+
return download("/api/operators/examples/download", null, fileName);
5454
}
5555

5656
// 发布算子

0 commit comments

Comments
 (0)