Set up the Accounts view with components

This commit is contained in:
Bubka
2023-10-20 13:28:17 +02:00
parent 4055a52daf
commit 5f83b5d70b
11 changed files with 909 additions and 19 deletions

View File

@ -3,12 +3,8 @@ import { httpClientFactory } from '@/services/httpClientFactory'
const apiClient = httpClientFactory('api')
export default {
/**
*
* @returns
*/
getAll() {
return apiClient.get('/twofaccounts')
getAll(withOtp = false) {
return apiClient.get('/twofaccounts' + (withOtp ? '?withOtp=1' : ''))
},
get(id, config = {}) {
@ -38,5 +34,21 @@ export default {
getOtpByParams(params, config = {}) {
return apiClient.post('/twofaccounts/otp', params, { ...config })
},
withdraw(ids, config = {}) {
return apiClient.patch('/twofaccounts/withdraw?ids=' + ids.join())
},
saveOrder(orderedIds, config = {}) {
return apiClient.post('/api/v1/twofaccounts/reorder', { orderedIds: orderedIds })
},
batchDelete(ids, config = {}) {
return apiClient.delete('/twofaccounts?ids=' + ids, { ...config })
},
export(ids, config = {}) {
return apiClient.delete('/twofaccounts/export?ids=' + ids, { ...config })
},
}