( current_chatTapID, id_in_chatTap, message, message_type, who )
| 787 | } |
| 788 | |
| 789 | async function patchChatToDB( |
| 790 | current_chatTapID, |
| 791 | id_in_chatTap, |
| 792 | message, |
| 793 | message_type, |
| 794 | who |
| 795 | ) { |
| 796 | // console.log("current_chatTapID-last", current_chatTapID); |
| 797 | // console.log("message-last", message); |
| 798 | |
| 799 | await fetch( |
| 800 | // `/chatapi/v1/chatlogs/${current_chatTapID}`, |
| 801 | // `/chatapi/v1/chats/${current_chatTapID}/chatlogs/${id_in_chatTap}`, |
| 802 | `${apiUrl}:${apiPort}/chatapi/v1/chats/${current_chatTapID}/chatlogs/${id_in_chatTap}`, |
| 803 | { |
| 804 | method: "PATCH", |
| 805 | headers: { |
| 806 | "Content-Type": "application/json", |
| 807 | }, |
| 808 | body: JSON.stringify({ |
| 809 | message: message, |
| 810 | message_type: message_type, |
| 811 | who: who, |
| 812 | }), |
| 813 | } |
| 814 | ) |
| 815 | .then((res) => res.json()) |
| 816 | .then((data) => { |
| 817 | console.log("data--best--patchChatlog", data); |
| 818 | }) |
| 819 | .catch((err) => { |
| 820 | console.log("err--best--patchChatlog", err); |
| 821 | }); |
| 822 | } |
| 823 | |
| 824 | async function getFilesURLs(file_id) { |
| 825 | console.log("step-1.getFiles"); |
nothing calls this directly
no outgoing calls
no test coverage detected