Switch to supabase (not fully complete)

This commit is contained in:
2025-10-12 12:57:04 +02:00
parent 2122d6d74f
commit 6bdf2233fe
11 changed files with 336 additions and 156 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ function MessageContainer({
}) {
useEffect(() => {
axios
.get("/api/user/", { params: { id: message.from } })
.get("/api/profile/", { params: { id: message.from } })
.then((res) =>
setUserList((prev) => ({ ...prev, [message.from]: res.data as User }))
)
+3 -1
View File
@@ -28,7 +28,9 @@ export default function Login() {
const login = async () => {
setFeedback(undefined);
try {
const res = await axios.put("/api/user", { username, password });
const res = await axios.get("/api/user", {
params: { username, password },
});
Cookies.set("token", (res.data as any).token);
setFeedback({