refactor express to use routes

This commit is contained in:
Daniel Avila 2023-02-12 16:38:33 -05:00
parent cd71bb0727
commit ed44daf8b3
11 changed files with 157 additions and 128 deletions

View file

@ -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([]));