Gaëtan Renaudeau
7 years ago
5 changed files with 14 additions and 29 deletions
@ -1,15 +1,8 @@ |
|||||
// @flow
|
// @flow
|
||||
import axios from 'axios' |
import network from 'api/network' |
||||
|
|
||||
import { GET_FINAL_FIRMWARE } from 'helpers/urls' |
import { GET_FINAL_FIRMWARE } from 'helpers/urls' |
||||
|
|
||||
export default async (id: number) => { |
export default async (id: number) => { |
||||
try { |
const { data } = await network({ method: 'GET', url: `${GET_FINAL_FIRMWARE}/${id}` }) |
||||
const { data } = await axios.get(`${GET_FINAL_FIRMWARE}/${id}`) |
return data |
||||
return data |
|
||||
} catch (err) { |
|
||||
const error = Error(err.message) |
|
||||
error.stack = err.stack |
|
||||
throw err |
|
||||
} |
|
||||
} |
} |
||||
|
Loading…
Reference in new issue