Commit b0cc39f2 authored by Shpuld Shpludson's avatar Shpuld Shpludson

Merge branch 'feat/return-api-result' into 'master'

Send API result as a result of toggleFollowState thunk

See merge request !45
parents e526f19a 31a249ee
Pipeline #29858 passed with stages
in 5 minutes and 23 seconds
......@@ -55,7 +55,7 @@ const usersThunks = {
}
await dispatch(Users.actions.addUser({ user }))
return getState()
return { state: getState(), result }
}
},
......
......@@ -126,7 +126,7 @@ describe('Users thunks', () => {
{ following: true },
{ expectedUrl: `https://pleroma.soykaf.com/api/v1/accounts/1/follow` }
))
let state = await usersThunks.toggleFollowState({ config, params: { id: '1', following: false } })(dispatch, getState)
let { state } = await usersThunks.toggleFollowState({ config, params: { id: '1', following: false } })(dispatch, getState)
const expectedResult = {
id: '1',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment