Fix wallet unlink 401 error
This commit is contained in:
@@ -56,12 +56,10 @@ export async function DELETE(req: NextRequest) {
|
|||||||
try {
|
try {
|
||||||
const auth = await buildBackendRequestHeaders(req);
|
const auth = await buildBackendRequestHeaders(req);
|
||||||
const proxiedHeaders = new Headers(auth.headers);
|
const proxiedHeaders = new Headers(auth.headers);
|
||||||
|
proxiedHeaders.set("Content-Type", "application/json");
|
||||||
const res = await fetch(`${API_BASE}/api/payments/wallets`, {
|
const res = await fetch(`${API_BASE}/api/payments/wallets`, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: proxiedHeaders,
|
||||||
...proxiedHeaders,
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
cache: "no-store",
|
cache: "no-store",
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user