Switch to supabase (not fully complete)
This commit is contained in:
@@ -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 }))
|
||||
)
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user