restructured code
This commit is contained in:
@@ -11,7 +11,7 @@ export const postApi = {
|
||||
return (await axios.get(`${path}/${id}`)).data;
|
||||
},
|
||||
async createNewPost(title, content) {
|
||||
const location = locationUtils.getCurrentLocation();
|
||||
const location = await locationUtils.getCurrentLocation();
|
||||
if(location.lon && location.lat) {
|
||||
await axios.post(`${path}s`, {
|
||||
"authorID": 1,
|
||||
|
||||
Reference in New Issue
Block a user