We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8364710 commit 7adf065Copy full SHA for 7adf065
code.editor.fpk
-1.11 KB
frontend/src/hooks/useCode.ts
@@ -24,9 +24,8 @@ export default function useCode(option: { path: string; confirm: () => boolean }
24
}
25
26
const { data } = await axios.get(HOST, {
27
- params: { path },
+ params: { _api: 'read', path },
28
responseType: 'blob',
29
- headers: { 'api-path': 'read' },
30
})
31
32
code.blob = data
@@ -72,9 +71,7 @@ export default function useCode(option: { path: string; confirm: () => boolean }
72
71
value: code.value,
73
path: option.path,
74
},
75
- {
76
- headers: { 'api-path': 'save' },
77
- },
+ { params: { _api: 'save' } },
78
)
79
80
if (value.code === 200) {
0 commit comments