This commit is contained in:
17
ayanova/src/api/getAPIItem.js
Normal file
17
ayanova/src/api/getAPIItem.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/* xeslint-disable */
|
||||
import apiUtil from "./apiutil";
|
||||
export default {
|
||||
get(route) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
fetch(apiUtil.APIUrl(route), apiUtil.fetchGetOptions())
|
||||
.then(apiUtil.status)
|
||||
.then(apiUtil.json)
|
||||
.then(response => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch(function(error) {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user