diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-12-19 09:50:59 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-12-20 11:07:49 +0100 |
commit | c9fe80865b35c835c25f42e7daa34d917461a7ec (patch) | |
tree | d5a9413773cfa4252065105271a63efc6d349e9a /src/store | |
parent | 4253672fc10cf2c35bd5dba6928bc03a085b294a (diff) |
Fix frontend for public profiles
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/account.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/store/account.js b/src/store/account.js index b423a369..30971023 100644 --- a/src/store/account.js +++ b/src/store/account.js @@ -51,6 +51,9 @@ const getters = { getAccount(state) { return (uid) => state.accounts[uid] }, + accountLoaded(state) { + return (uid) => uid in state.accounts + }, getAccountFollowers(state) { return (uid) => state.accountsFollowers[uid] }, @@ -62,6 +65,8 @@ const actions = { fetchAccountInfo(context, uid) { axios.get(OC.generateUrl(`apps/social/api/v1/account/${uid}/info`)).then((response) => { context.commit('addAccount', { uid: uid, data: response.data.result.account }) + }).catch((response) => { + context.commit('addAccount', { uid: uid, data: null }) }) }, fetchAccountFollowers(context, uid) { |