(command, args = {})
| 37 | ] |
| 38 | |
| 39 | export function getAPI (command, args = {}) { |
| 40 | args.command = command |
| 41 | args.response = 'json' |
| 42 | |
| 43 | const sessionkey = vueProps.$localStorage.get(ACCESS_TOKEN) || Cookies.get('sessionkey') |
| 44 | if (sessionkey) { |
| 45 | args.sessionkey = sessionkey |
| 46 | } |
| 47 | |
| 48 | return axios({ |
| 49 | params: { |
| 50 | ...args |
| 51 | }, |
| 52 | url: '/', |
| 53 | method: 'GET' |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | export function postAPI (command, data = {}) { |
| 58 | const params = new URLSearchParams() |
no test coverage detected