summaryrefslogtreecommitdiffstats
path: root/src/store
diff options
context:
space:
mode:
authorCyrille Bollu <cyrpub@bollu.be>2019-09-14 15:23:24 +0200
committerMaxence Lange <maxence@artificial-owl.com>2019-09-25 14:07:24 +0200
commitc3d605f3ef2277fc000ba1169da2deeb0a41e32f (patch)
tree96c83d9fcfd70c1ba5579d798bb0bd449e31044b /src/store
parentbf5b4483b794e2ea42b2940944d8ce628c9e6c16 (diff)
Uses proper endpoint to get a single post's content.
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
Diffstat (limited to 'src/store')
-rw-r--r--src/store/timeline.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/store/timeline.js b/src/store/timeline.js
index b770c7a1..4122b525 100644
--- a/src/store/timeline.js
+++ b/src/store/timeline.js
@@ -186,13 +186,14 @@ const actions = {
sinceTimestamp = state.since - 1
}
+ // Compute URl to get the data
let url
if (state.type === 'account') {
url = OC.generateUrl(`apps/social/api/v1/account/${state.account}/stream?limit=25&since=` + sinceTimestamp)
} else if (state.type === 'tags') {
url = OC.generateUrl(`apps/social/api/v1/stream/tag/${state.params.tag}?limit=25&since=` + sinceTimestamp)
} else if (state.type === 'single-post') {
- url = OC.generateUrl(`apps/social/@${state.params.account}/${state.params.id}`)
+ url = OC.generateUrl(`apps/social/local/v1/post?id=${state.params.id}`)
} else {
url = OC.generateUrl(`apps/social/api/v1/stream/${state.type}?limit=25&since=` + sinceTimestamp)
}