mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
[web] Fixes #3228:API endpoint error
This commit is contained in:
parent
e74e97bcd9
commit
e9e2b7f443
@ -159,7 +159,7 @@ describe('flows actions', () => {
|
|||||||
store.dispatch(flowActions.uploadContent(tflow, 'foo', 'foo'))
|
store.dispatch(flowActions.uploadContent(tflow, 'foo', 'foo'))
|
||||||
// window.Blob's lastModified is always the current time,
|
// window.Blob's lastModified is always the current time,
|
||||||
// which causes flaky tests on comparison.
|
// which causes flaky tests on comparison.
|
||||||
expect(fetchApi).toBeCalledWith('/flows/1/foo/content', { method: 'POST', body: expect.anything()})
|
expect(fetchApi).toBeCalledWith('/flows/1/foo/content.data', { method: 'POST', body: expect.anything()})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should handle clear action', () => {
|
it('should handle clear action', () => {
|
||||||
|
@ -209,7 +209,7 @@ export function uploadContent(flow, file, type) {
|
|||||||
const body = new FormData()
|
const body = new FormData()
|
||||||
file = new window.Blob([file], { type: 'plain/text' })
|
file = new window.Blob([file], { type: 'plain/text' })
|
||||||
body.append('file', file)
|
body.append('file', file)
|
||||||
return dispatch => fetchApi(`/flows/${flow.id}/${type}/content`, { method: 'POST', body })
|
return dispatch => fetchApi(`/flows/${flow.id}/${type}/content.data`, { method: 'POST', body })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user