fixed error loading posts when not logged in
This commit is contained in:
@@ -6,9 +6,11 @@ const path = "https://api.jodel.anxietyprime.de/post";
|
||||
|
||||
export const postApi = {
|
||||
async getPostsByCoords (lon, lat) {
|
||||
if (!keycloak.authenticated) return [];
|
||||
return (await axios.get(`${path}s/${lon}/${lat}`)).data;
|
||||
},
|
||||
async getPostByID (id) {
|
||||
if (!keycloak.authenticated) return [];
|
||||
return (await axios.get(`${path}/${id}`)).data;
|
||||
},
|
||||
async createNewPost(title, content, parent = null) {
|
||||
|
||||
Reference in New Issue
Block a user