Skip to content

Commit

Permalink
fix(app): follow core url
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 9, 2022
1 parent 22dbed3 commit d98f984
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/components/widgets/Lists/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author: Wibus
* @Date: 2022-07-15 17:06:10
* @LastEditors: Wibus
* @LastEditTime: 2022-07-30 17:35:06
* @LastEditTime: 2022-08-09 15:08:33
* Coding With IU
*/
import { Table, Tabs } from "@geist-ui/core";
Expand All @@ -24,7 +24,7 @@ export const Lists = () => {
.then((res) => {
// console.log(res)
const { data } = res as any;
const content = [];
const content = new Array();
for (const index of Object.keys(data)) {
content.push({
title: data[index].title,
Expand All @@ -37,15 +37,15 @@ export const Lists = () => {
setArticle(content);
});
await apiClient
.get("/comment", null, [
.get("/comments", null, [
{ key: "page", value: 1 },
{ key: "size", value: 5 },
{ key: "status", value: 0 },
])
.then((res) => {
// console.log(res)
const { data } = res as any;
const content = [];
const content = new Array();
for (const index of Object.keys(data)) {
content.push({
author: data[index].author,
Expand All @@ -67,7 +67,7 @@ export const Lists = () => {
.then((res) => {
// console.log(res)
const { data } = res as any;
const content = [];
const content = new Array();
for (const index of Object.keys(data)) {
content.push({
name: data[index].name,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/use-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum SystemApi {
categories = "/categories",
tags = "/categories?type=Tag",
users = "/user",
comment = "/comment",
comment = "/comments",
aggregate = "/aggregate",
links = "/links",
init = "/init",
Expand Down
10 changes: 5 additions & 5 deletions src/pages/Comments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author: Wibus
* @Date: 2022-07-15 18:45:35
* @LastEditors: Wibus
* @LastEditTime: 2022-08-03 13:50:46
* @LastEditTime: 2022-08-09 15:08:10
* Coding With IU
*/

Expand Down Expand Up @@ -48,7 +48,7 @@ export const Comments: BasicPage = () => {

const request = async () => {
await apiClient
.get("/comment", null, [
.get("/comments", null, [
{ key: "page", value: nowPage },
{ key: "size", value: 5 },
{ key: "status", value: Number(nowTab) - 1 },
Expand Down Expand Up @@ -231,7 +231,7 @@ export const Comments: BasicPage = () => {
type="button"
onClick={async () => {
await apiClient
.patch(`/comment/${comment.id}`, null, null, { status: 1 })
.patch(`/comments/${comment.id}`, null, null, { status: 1 })
.then((res) => {
console.log(res);
message.success(`已将 ${comment.author} 的评论标为已读`);
Expand All @@ -246,7 +246,7 @@ export const Comments: BasicPage = () => {
type="button"
onClick={async () => {
await apiClient
.patch(`/comment/${comment.id}`, null, null, { status: 2 })
.patch(`/comments/${comment.id}`, null, null, { status: 2 })
.then(() => {
message.success(`已将 ${comment.text} 的评论标为垃圾评论`);
request();
Expand Down Expand Up @@ -402,7 +402,7 @@ export const Comments: BasicPage = () => {
onClick={async () => {
// console.log(reply.reply_text)
await apiClient
.post(`/comment/master/reply/${reply.data.id}`, null, null, {
.post(`/comments/master/reply/${reply.data.id}`, null, null, {
text: reply.reply_text,
})
.then(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/router/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author: Wibus
* @Date: 2022-07-12 16:25:35
* @LastEditors: Wibus
* @LastEditTime: 2022-08-02 20:51:59
* @LastEditTime: 2022-08-09 15:08:53
* Coding With IU
*/

Expand Down

0 comments on commit d98f984

Please sign in to comment.