mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 18:12:26 -05:00
[chore/frogend] fix profile preview css, use role info (#1130)
* fix profile preview css, use role info * remove unused redux selector
This commit is contained in:
parent
1281a9fd4a
commit
5ba5fb3154
5 changed files with 52 additions and 29 deletions
|
|
@ -97,7 +97,10 @@ module.exports = function oauthAPI({ apiCall, getCurrentUrl }) {
|
|||
}
|
||||
|
||||
// newer GoToSocial version will include a `role` in the Account data, check that first
|
||||
// TODO: check account data for admin status
|
||||
if (state.user.profile.role == "admin") {
|
||||
dispatch(oauth.setAdmin(true));
|
||||
return true;
|
||||
}
|
||||
|
||||
// no role info, try fetching an admin-only route and see if we get an error
|
||||
return Promise.try(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue