Modificacion en api de lista
This commit is contained in:
@@ -86,7 +86,7 @@ const AddForm = (props) => {
|
||||
|
||||
const handleSave = () => {
|
||||
add_to_list(context.user.access_token, JSON.parse(window.localStorage.getItem('user')).id,
|
||||
props.entity, props.type, []).then(() => {
|
||||
props.entity, props.type, [], opinion, stars).then(() => {
|
||||
setState(1);
|
||||
}).catch((error) => {
|
||||
console.log('Request error', error.response)
|
||||
|
||||
@@ -6,11 +6,13 @@ export function get_list(user_id) {
|
||||
return axios.get(`${baseUrl}/list/${user_id}/`)
|
||||
}
|
||||
|
||||
export function add_to_list(token, user_id, entity, entity_type, tags) {
|
||||
export function add_to_list(token, user_id, entity, entity_type, tags, opinion, stars) {
|
||||
const post_data = {
|
||||
entity: entity,
|
||||
entity_type: entity_type,
|
||||
tags: tags
|
||||
tags: tags,
|
||||
opinion: opinion,
|
||||
stars: stars,
|
||||
};
|
||||
|
||||
return axios.post(`${baseUrl}/list/${user_id}/`, post_data, {
|
||||
|
||||
Reference in New Issue
Block a user