api refactoring

This commit is contained in:
Čarodej
2022-05-11 09:19:55 +02:00
parent d2371e667f
commit 70901a2df5
59 changed files with 861 additions and 578 deletions
+3 -3
View File
@@ -149,9 +149,9 @@ const actions = {
return new Promise((resolve, reject) => {
// Get route
let route = {
RequestUpload: `/api/upload-request/${router.currentRoute.params.token}/upload`,
Public: `/api/editor/upload/${router.currentRoute.params.token}`,
}[router.currentRoute.name] || '/api/upload'
RequestUpload: `/api/upload-request/${router.currentRoute.params.token}/upload/chunks`,
Public: `/api/editor/upload/chunks/${router.currentRoute.params.token}`,
}[router.currentRoute.name] || '/api/upload/chunks'
// Create cancel token for axios cancellation
const CancelToken = axios.CancelToken,