mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-21 12:32:04 +02:00
Set up TwoFAccounts api service
This commit is contained in:
parent
ed1a653b37
commit
536dcb1e95
42
resources/js_vue3/services/twofaccountService.js
vendored
Normal file
42
resources/js_vue3/services/twofaccountService.js
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { httpClientFactory } from '@/services/httpClientFactory'
|
||||||
|
|
||||||
|
const apiClient = httpClientFactory('api')
|
||||||
|
|
||||||
|
export default {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getAll() {
|
||||||
|
return apiClient.get('/twofaccounts')
|
||||||
|
},
|
||||||
|
|
||||||
|
get(id, config = {}) {
|
||||||
|
return apiClient.get('/twofaccounts/' + id, { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
preview(uri, config = {}) {
|
||||||
|
return apiClient.post('/twofaccounts/preview', { uri: uri }, { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
getLogo(service, config = {}) {
|
||||||
|
return apiClient.post('/icons/default', { service: service }, { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteIcon(icon, config = {}) {
|
||||||
|
return apiClient.delete('/icons/' + icon, { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
getOtpById(id, config = {}) {
|
||||||
|
return apiClient.get('/twofaccounts/' + id + '/otp', { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
getOtpByUri(uri, config = {}) {
|
||||||
|
return apiClient.post('/twofaccounts/otp', { uri: uri }, { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
getOtpByParams(params, config = {}) {
|
||||||
|
return apiClient.post('/twofaccounts/otp', params, { ...config })
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user