Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5787 Rev 5791
Línea 109... Línea 109...
109
        })
109
        })
110
        .catch((err) => reject(err))
110
        .catch((err) => reject(err))
111
    }
111
    }
112
  })
112
  })
Línea 113... Línea 113...
113
 
113
 
114
  const saveReaction = (type) => {
114
  const saveReaction = async (type) => {
115
    const reactionTypesUrl = {
115
    const reactionTypesUrl = {
116
      r: feed.feed_save_reaction_recommended_url,
116
      r: feed.feed_save_reaction_recommended_url,
117
      s: feed.feed_save_reaction_support_url,
117
      s: feed.feed_save_reaction_support_url,
118
      l: feed.feed_save_reaction_love_url,
118
      l: feed.feed_save_reaction_love_url,
119
      i: feed.feed_save_reaction_interest_url,
119
      i: feed.feed_save_reaction_interest_url,
120
      f: feed.feed_save_reaction_fun_url,
120
      f: feed.feed_save_reaction_fun_url,
Línea 121... Línea 121...
121
    }
121
    }
122
 
122
 
Línea 123... Línea 123...
123
    axios.post(reactionTypesUrl[type]).then((res) => {
123
    await axios.post(reactionTypesUrl[type]).then((res) => {
124
      const { success, data } = res.data
124
      const { success, data } = res.data
125
 
125
 
Línea 130... Línea 130...
130
      setOwnerReaction(data.reactions)
130
      setOwnerReaction(data.reactions)
131
      return true
131
      return true
132
    })
132
    })
133
  }
133
  }
Línea 134... Línea 134...
134
 
134
 
135
  const deleteReaction = () => {
135
  const deleteReaction = async () => {
136
    axios.post(feed.feed_delete_reaction_url).then((res) => {
136
    await axios.post(feed.feed_delete_reaction_url).then((res) => {
Línea 137... Línea 137...
137
      const { success, data } = res.data
137
      const { success, data } = res.data
138
 
138
 
139
      if (!success) {
139
      if (!success) {