support export to tsv file

This commit is contained in:
MaysWind
2023-10-29 17:30:20 +08:00
parent 429e270a9e
commit dc837c430f
14 changed files with 443 additions and 295 deletions
+8 -2
View File
@@ -214,8 +214,14 @@ export default {
getUserDataStatistics: () => {
return axios.get('v1/data/statistics.json');
},
getExportedUserData: () => {
return axios.get('v1/data/export.csv');
getExportedUserData: (fileType) => {
if (fileType === 'csv') {
return axios.get('v1/data/export.csv');
} else if (fileType === 'tsv') {
return axios.get('v1/data/export.tsv');
} else {
return Promise.reject('Parameter Invalid');
}
},
clearData: ({ password }) => {
return axios.post('v1/data/clear.json', {