restructured code

This commit is contained in:
Pete Gerlach
2024-06-11 15:26:49 +02:00
parent 5ef0b504e1
commit f17b253ac6
3 changed files with 9 additions and 7 deletions

View File

@@ -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,