Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 5 | Rev 1657 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5 Rev 1650
Línea 1... Línea 1...
1
import { axios } from '../../utils'
1
import { axios } from '../../utils'
2
import { feedActionTypes } from './feed.types'
2
import { feedActionTypes } from './feed.types'
Línea 3... Línea 3...
3
 
3
 
4
export const setTimelineUrl = (url) => ({
4
export const setTimelineUrl = (url) => ({
5
  type: feedActionTypes.SET_TIMELINE_URL,
5
  type: feedActionTypes.SET_TIMELINE_URL,
6
  payload: url,
6
  payload: url
Línea 7... Línea 7...
7
})
7
})
8
 
8
 
9
export const loadFeeds = () => ({
9
export const loadFeeds = () => ({
Línea 10... Línea 10...
10
  type: feedActionTypes.LOAD_FEEDS,
10
  type: feedActionTypes.LOAD_FEEDS
11
})
11
})
12
 
12
 
13
export const loadFeedsSuccess = (feeds, currentPage, pages) => ({
13
export const loadFeedsSuccess = (feeds, currentPage, pages) => ({
Línea 14... Línea 14...
14
  type: feedActionTypes.LOAD_FEEDS_SUCCESS,
14
  type: feedActionTypes.LOAD_FEEDS_SUCCESS,
15
  payload: { feeds, currentPage, pages },
15
  payload: { feeds, currentPage, pages }
16
})
16
})
17
 
17
 
Línea 18... Línea 18...
18
export const addFeed = (feed, feedSharedId = '') => ({
18
export const addFeed = (feed, feedSharedId = '') => ({
19
  type: feedActionTypes.ADD_FEED,
19
  type: feedActionTypes.ADD_FEED,
20
  payload: { feed, feedSharedId },
20
  payload: { feed, feedSharedId }
21
})
21
})
22
 
-
 
23
export const updateFeed = ({ feed, uuid }) => ({
22
 
24
  type: feedActionTypes.UPDATE_FEED,
23
export const updateFeed = ({ feed, uuid }) => ({
25
  payload: { feed, uuid },
24
  type: feedActionTypes.UPDATE_FEED,
26
})
25
  payload: { feed, uuid }
Línea 27... Línea 26...
27
 
26
})
28
export const deleteFeed = (feedId) => ({
27
export const deleteFeed = (feedId) => ({
29
  type: feedActionTypes.DELETE_FEED,
28
  type: feedActionTypes.DELETE_FEED,
30
  payload: feedId,
29
  payload: feedId
Línea 31... Línea 30...
31
})
30
})
32
 
31
 
33
export const setCurrentPage = (page) => ({
32
export const setCurrentPage = (page) => ({
Línea 56... Línea 55...
56
        console.log(err)
55
        console.log(err)
57
        throw new Error(err)
56
        throw new Error(err)
58
      })
57
      })
59
  }
58
  }
60
}
59
}
-
 
60
 
-
 
61
export const removeComment = ({ feedId, commentId, totalComments }) => ({
-
 
62
  type: feedActionTypes.REMOVE_COMMENT,
-
 
63
  payload: { feedId, commentId, totalComments }
-
 
64
})
-
 
65
 
-
 
66
export const addComment = ({ feedId, comment, totalComments }) => ({
-
 
67
  type: feedActionTypes.REMOVE_COMMENT,
-
 
68
  payload: { feedId, comment, totalComments }
-
 
69
})