mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Proxy API and webapp through NGINX as well
This commit is contained in:
@@ -15,19 +15,16 @@ export const actions: Actions = {
|
||||
deleteAccount: async ({ request, fetch, cookies }) => {
|
||||
const data = await request.formData();
|
||||
|
||||
const res = await fetch(
|
||||
`http://localhost:${process.env.ARCHTIKA_API_PORT}/rpc/delete_account`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${cookies.get("session_token")}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
password: data.get("password")
|
||||
})
|
||||
}
|
||||
);
|
||||
const res = await fetch(`/api/rpc/delete_account`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${cookies.get("session_token")}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
password: data.get("password")
|
||||
})
|
||||
});
|
||||
|
||||
const response = await res.json();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user