Browse Source

Fix undefined URL in `fetchDomainBlocks`

closed-social-glitch-2
Thibaut Girka 6 years ago
parent
commit
937ace10d9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/actions/domain_blocks.js

+ 1
- 1
app/javascript/flavours/glitch/actions/domain_blocks.js View File

@ -86,7 +86,7 @@ export function fetchDomainBlocks() {
return (dispatch, getState) => { return (dispatch, getState) => {
dispatch(fetchDomainBlocksRequest()); dispatch(fetchDomainBlocksRequest());
api(getState).get().then(response => {
api(getState).get('/api/v1/domain_blocks').then(response => {
const next = getLinks(response).refs.find(link => link.rel === 'next'); const next = getLinks(response).refs.find(link => link.rel === 'next');
dispatch(fetchDomainBlocksSuccess(response.data, next ? next.uri : null)); dispatch(fetchDomainBlocksSuccess(response.data, next ? next.uri : null));
}).catch(err => { }).catch(err => {

Loading…
Cancel
Save