Gaëtan Renaudeau
7 years ago
6 changed files with 41 additions and 30 deletions
@ -1,19 +1,16 @@ |
|||
// @flow
|
|||
import axios from 'axios' |
|||
|
|||
import { GET_DEVICE_VERSION } from 'helpers/urls' |
|||
import network from 'api/network' |
|||
|
|||
export default async (targetId: string | number): Promise<*> => { |
|||
try { |
|||
const provider = 1 |
|||
const { data } = await axios.post(GET_DEVICE_VERSION, { |
|||
const provider = 1 |
|||
const { data } = await network({ |
|||
method: 'POST', |
|||
url: GET_DEVICE_VERSION, |
|||
data: { |
|||
provider, |
|||
target_id: targetId, |
|||
}) |
|||
return data |
|||
} catch (err) { |
|||
const error = Error(err.message) |
|||
error.stack = err.stack |
|||
throw err |
|||
} |
|||
}, |
|||
}) |
|||
return data |
|||
} |
|||
|
Loading…
Reference in new issue