mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-26 05:08:50 +01:00
refactor express to use routes
This commit is contained in:
parent
cd71bb0727
commit
ed44daf8b3
11 changed files with 157 additions and 128 deletions
|
|
@ -14,7 +14,7 @@ export default function Conversation({ id, parentMessageId, conversationId, titl
|
|||
const inputRef = useRef(null);
|
||||
const dispatch = useDispatch();
|
||||
const { trigger, isMutating } = manualSWR(`http://localhost:3050/messages/${id}`, 'get');
|
||||
const rename = manualSWR(`http://localhost:3050/update_convo`, 'post');
|
||||
const rename = manualSWR(`http://localhost:3050/convos/update`, 'post');
|
||||
|
||||
const clickHandler = async () => {
|
||||
if (conversationId === id) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { setMessages } from '~/store/messageSlice';
|
|||
export default function DeleteButton({ conversationId, renaming, cancelHandler }) {
|
||||
const dispatch = useDispatch();
|
||||
const { trigger, isMutating } = manualSWR(
|
||||
'http://localhost:3050/clear_convos',
|
||||
'http://localhost:3050/convos/clear',
|
||||
'post',
|
||||
() => {
|
||||
dispatch(setMessages([]));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default function ClearConvos() {
|
|||
const dispatch = useDispatch();
|
||||
|
||||
const { trigger, isMutating } = manualSWR(
|
||||
'http://localhost:3050/clear_convos',
|
||||
'http://localhost:3050/convos/clear',
|
||||
'post',
|
||||
() => {
|
||||
dispatch(setMessages([]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue