forked from Gitlink/forgeplus-react
Change ForumSection Watch APi
This commit is contained in:
parent
d1232be557
commit
4596eac895
|
@ -58,8 +58,8 @@ export function initAxiosInterceptors(props) {
|
|||
initOnlineOfflineListener()
|
||||
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
|
||||
var
|
||||
// proxy = "http://localhost:3000"
|
||||
proxy = "https://testforgeplus.trustie.net"
|
||||
proxy = "http://localhost:3000"
|
||||
// proxy = "https://testforgeplus.trustie.net"
|
||||
|
||||
const requestMap = {};
|
||||
window.setfalseInRequestMap = function (keyName) {
|
||||
|
|
|
@ -65,7 +65,7 @@ export default ({ headData, title , operation , history }) => {
|
|||
// 收藏、取消收藏
|
||||
function saveForum(id){
|
||||
if(id){
|
||||
const url = `/memos/forum_memos/${id}/is_watch.json`;
|
||||
const url = `/forum_memos/${id}/is_watch.json`;
|
||||
axios.post(url,{
|
||||
is_watch:watched?0:1
|
||||
}).then(result=>{
|
||||
|
|
|
@ -16,7 +16,7 @@ function section_item({ forum_section, key }) {
|
|||
|
||||
function handleClick(){
|
||||
setIsLoading(true);
|
||||
let url = `/v1/memos/forum_memos/${forum_section.id}/is_watch.json`;
|
||||
let url = `/forum_memos/${forum_section.id}/is_watch.json`;
|
||||
axios.post(url, {
|
||||
is_watch: isStar ? 0 : 1
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue