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

Commit

Permalink
chore: add disclaimer for awral
Browse files Browse the repository at this point in the history
chore: add disclaimer for awral
  • Loading branch information
Metnew committed Nov 11, 2017
1 parent d30c0f8 commit 1222ffa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
15 changes: 10 additions & 5 deletions src/common/actions/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ export type LOGIN_AUTH_FAIL_TYPE = {
export const LOGOUT_AUTH_SUCCESS = 'LOGOUT_AUTH_SUCCESS'
export type LOGOUT_AUTH_SUCCESS_TYPE = {type: 'LOGOUT_AUTH_SUCCESS'}

/**
Awral is not recommended for production usage now
But it can make your work with actions even simpler.
NOTE: I strongly recommend you check Awral's sources!
Awral is 910 bytes gzipped!
{@link https://github.com/Metnew/awral}
*/
const awralLogin = awral.of({
success ({payload, dispatch}) {
setLocalToken(payload.token)
Expand All @@ -29,9 +36,7 @@ const awralLogin = awral.of({

export const LOGIN_AUTH = awralLogin(loginAPI)('LOGIN_AUTH')

export const LOGOUT_AUTH = () => {
return dispatch => {
resetLocalToken()
dispatch({type: LOGOUT_AUTH_SUCCESS})
}
export const LOGOUT_AUTH = () => dispatch => {
resetLocalToken()
dispatch({type: LOGOUT_AUTH_SUCCESS})
}
7 changes: 7 additions & 0 deletions src/common/actions/links/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ export type GET_LINKS_PENDING_TYPE = {
type: 'GET_LINKS_PENDING'
}

/**
Awral is not recommended for production usage now
But it can make your work with actions even simpler.
NOTE: I strongly recommend you check Awral's sources!
Awral is 910 bytes gzipped!
{@link https://github.com/Metnew/awral}
*/
export const GET_LINKS = awral(getLinksAPI)('GET_LINKS')
2 changes: 1 addition & 1 deletion src/common/actions/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const beforePending = null
Create default Awral
Awral is not recommended for production usage now
But it can make your work with actions even simpler.
NOTE: I strongly recommend you check Awral sources!
NOTE: I strongly recommend you check Awral's sources!
Awral is 910 bytes gzipped!
{@link https://github.com/Metnew/awral}
*/
Expand Down

0 comments on commit 1222ffa

Please sign in to comment.