visuddhinanda 1 год назад
Родитель
Сommit
b4d8db986b
1 измененных файлов с 9 добавлено и 5 удалено
  1. 9 5
      dashboard/src/components/channel/ChannelMy.tsx

+ 9 - 5
dashboard/src/components/channel/ChannelMy.tsx

@@ -170,10 +170,13 @@ const ChannelMy = ({
       const id = articleId?.split("-");
       const id = articleId?.split("-");
       if (id?.length === 2) {
       if (id?.length === 2) {
         const url = `/v2/sentences-in-chapter?book=${id[0]}&para=${id[1]}`;
         const url = `/v2/sentences-in-chapter?book=${id[0]}&para=${id[1]}`;
-        console.info("ChannelMy url", url);
+        console.info("ChannelMy url api request", url);
         get<ISentInChapterListResponse>(url)
         get<ISentInChapterListResponse>(url)
           .then((res) => {
           .then((res) => {
-            console.debug("ChannelMy ISentInChapterListResponse", res);
+            console.debug(
+              "ChannelMy ISentInChapterListResponse api response",
+              res
+            );
             if (res && res.ok) {
             if (res && res.ok) {
               sentList = res.data.rows.map((item) => {
               sentList = res.data.rows.map((item) => {
                 return `${item.book}-${item.paragraph}-${item.word_begin}-${item.word_end}`;
                 return `${item.book}-${item.paragraph}-${item.word_begin}-${item.word_end}`;
@@ -200,14 +203,15 @@ const ChannelMy = ({
     console.debug("sentences", sentences);
     console.debug("sentences", sentences);
     const currOwner = "all";
     const currOwner = "all";
 
 
-    console.log("owner", currOwner);
+    const url = `/v2/channel-progress`;
+    console.info("api request", url);
     setLoading(true);
     setLoading(true);
-    post<IProgressRequest, IApiResponseChannelList>(`/v2/channel-progress`, {
+    post<IProgressRequest, IApiResponseChannelList>(url, {
       sentence: sentences,
       sentence: sentences,
       owner: currOwner,
       owner: currOwner,
     })
     })
       .then((res) => {
       .then((res) => {
-        console.debug("progress data", res.data.rows);
+        console.debug("progress data api response", res);
         const items: IItem[] = res.data.rows
         const items: IItem[] = res.data.rows
           .filter((value) => value.name.substring(0, 4) !== "_Sys")
           .filter((value) => value.name.substring(0, 4) !== "_Sys")
           .map((item, id) => {
           .map((item, id) => {