|
|
@@ -4,18 +4,15 @@ const prefix = "/communication";
|
|
|
|
|
|
function getAllCommunications(payload) {
|
|
|
const {page, size, sort} = payload;
|
|
|
- // return axios.get("https://www.fastmock.site/mock/7626b3aeb545b939cbf526e8fcfda744/api/communications", {params: {userId, page, size, sort}});
|
|
|
return axios.get(`${prefix}`, {params: {page, size, sort}});
|
|
|
|
|
|
}
|
|
|
|
|
|
function getCommunicationStarers(communicationId) {
|
|
|
- // return axios.get(`https://www.fastmock.site/mock/7626b3aeb545b939cbf526e8fcfda744/api/communications/${communicationId}/stars/users`);
|
|
|
return axios.get(`${prefix}/${communicationId}/stars/users`);
|
|
|
}
|
|
|
|
|
|
function getCommunicationDetail(communicationId) {
|
|
|
- // return axios.get(`https://www.fastmock.site/mock/7626b3aeb545b939cbf526e8fcfda744/api/communications/${communicationId}`);
|
|
|
return axios.get(`${prefix}/${communicationId}`);
|
|
|
|
|
|
}
|
|
|
@@ -25,7 +22,7 @@ function getUserPublishCommunication(userId,page,size){
|
|
|
}
|
|
|
|
|
|
function starCommunication(userId,communicationId){
|
|
|
- return axios.post(`${prefix}/${communicationId}/stars`,{params:{userId}});
|
|
|
+ return axios.post(`${prefix}/${communicationId}/stars?userId=${userId}`);
|
|
|
}
|
|
|
|
|
|
function cancelStarCommunication(userId,communicationId){
|