blog data
This commit is contained in:
Vendored
+25
-3
@@ -7,7 +7,8 @@ class SiteService {
|
||||
}
|
||||
// Blog Data {Get}
|
||||
blogData(id) {
|
||||
return this.getAuxEnd("/blogdata", null);
|
||||
//myfit
|
||||
return this.getBlogEnd("/myfit", null);
|
||||
}
|
||||
|
||||
// Country Data {GET}
|
||||
@@ -56,13 +57,34 @@ class SiteService {
|
||||
});
|
||||
}
|
||||
|
||||
getBlogEnd(uri, reqData) {
|
||||
const endPoint = "https://blogdata.chiefsoft.net/blogdata" + uri;
|
||||
return Axios.get(endPoint)
|
||||
.then((response) => {
|
||||
// console.log(response);
|
||||
// res = response;
|
||||
// console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
|
||||
return response;
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.response) {
|
||||
//response status is an error code
|
||||
console.log(error.response.status);
|
||||
} else if (error.request) {
|
||||
//response not received though the request was sent
|
||||
console.log(error.request);
|
||||
} else {
|
||||
//an error occurred when setting up the request
|
||||
console.log(error.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
postAuxEnd(uri, reqData) {
|
||||
const endPoint = process.env.REACT_APP_AUX_ENDPOINT + uri;
|
||||
return Axios.post(endPoint, reqData)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
// res = response;
|
||||
console.log("~~~~~~~ Toks2 POST ~~~~~~~~");
|
||||
// res = response
|
||||
return response;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user