Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
Redux-saga POST method don't save the object in data base

In my project I want to create a new soccer club.

I'm using redux-saga to POST a club, but in my redux-saga method createCLub(), his stop everytime in the yield call(api.POST...) and don't save in the data base (and never enter in the catch).

reducer.js

export function signUpClub({login, password, tradingName, corporateName, cnpj }) {
  return {
    type: '@auth/SIGN_UP_CLUB',
    payload: {
      login, password, tradingName, corporateName, cnpj
    },
  };
}

actions.js

export function* createClub({payload}){
  try{
    const { login, password, tradingName, corporateName, cnpj} = payload;

    const response = yield call(api.post, '/club', { login, password, tradingName, corporateName, cnpj});

    const { club } = response.data
    
     yield put(signUpClub(club));  
    history.push('/');
  } catch(err){
    toast.error(err);
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!