export function getRecipes( options = {} ) { return when( get( baseUrl( 'recipes' ), { params: { page: options.page } } ) ); }
import { post, get } from 'utils/http'; export default { me() { return get('me'); }, signupLocal(payload) { return post('auth/register', { params: { username: payload.username, password: payload.password, email: payload.email } }); }, loginLocal(payload) { return post('auth/login', { params: { username: payload.email, password: payload.password } }); }, logout() { return post('auth/logout'); }, verifyEmailCode(code) { return post('auth/verify_email_code/', {
import { get } from 'utils/http'; export default { getAll(data) { return get(`users/`, {params: data}); } };
export function getOils() { return when( get( baseUrl( 'oils' ) ) ); }
export function getOilById( oilId ) { return when( get( baseUrl( `oils/${oilId}` ) ) ); }
export function getOilComments( oil ) { return when( get( baseUrl( `oils/${oil.id}/comments` ) ) ); }
return dispatch => { return http.get({ url: '/channel/recommend' }).then(response(dispatch)) }
function logout() { return req.get('/api/logout') }
function profile() { return req.get('/api/me') }
export function getRecipeJournals( recipe ) { return when( get( baseUrl( `recipes/${recipe.id}/journals` ) ) ); }
export function getRecipeJournal( recipe, journal ) { return when( get( baseUrl( `recipes/${recipe.id}/journals/${journal.id}` ) ) ); }
export function getRecipeComments( recipe ) { return when( get( baseUrl( `recipes/${recipe.id}/comments` ) ) ); }
export function getRecipeById( id ) { return when( get( baseUrl( `recipes/${id}` ) ) ); }