Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat(actons/utils): disable "FINALLY", "BEFORE_PENDING" in awral
Browse files Browse the repository at this point in the history
feat(actons/utils): disable "FINALLY", "BEFORE_PENDING" in awral
  • Loading branch information
Metnew committed Oct 18, 2017
1 parent 17e9b55 commit 3558336
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/common/actions/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import Awral from 'awral'
import Awral from './awral'
/**
* `parseJSON()` adds property "ok"
* that identicates that response is OK
Expand All @@ -12,6 +12,11 @@ import Awral from 'awral'
const check = (result: Object = {ok: false}): boolean => result.ok
const beforeCheck = a => a
const afterCheck = a => a.data
// disable dispatch of GET_LINKS_FINALLY
const finallyAction = null
// disable dispatch of GET_LINKS_BEFORE_PENDING
const beforePending = null

/**
Create default Awral
Awral is not recommended for production usage now
Expand All @@ -20,4 +25,4 @@ const afterCheck = a => a.data
Awral is 880B gzipped!
{@link https://github.com/Metnew/awral}
*/
export const awral = Awral.of({check, beforeCheck, afterCheck})
export const awral = Awral.of({check, beforeCheck, afterCheck, finally: finallyAction, beforePending})

0 comments on commit 3558336

Please sign in to comment.