index.js
922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import axios from 'axios'
const instance = axios.create({
baseURL: process.env.VUE_APP_API_URL,
});
function registerUser(userData) {
// const url = 'http://localhost:3000/api/signup'
return axios.post('/api/RegistUser', userData);
}
function loginUser(userData) {
// const url = 'http://localhost:3000/api/login'
return axios.post('/api/login', userData);
}
function folder(curData) {
return axios.get('/api/folder/show', {
params: {
id: curData.id,
cur: curData.cur
}
});
}
function makeFolder(folderData) {
return axios.post('/api/folder/makefolder', folderData);
}
function deleteFolder(folderData) {
return axios.post('/api/folder/delfolder', folderData);
}
function moveFolder(folderData) {
return axios.post('/api/folder/move', folderData);
}
export { registerUser, loginUser, folder, makeFolder, deleteFolder, moveFolder };