fix: correct API endpoint paths from /api/gateway/api to /api
- signup.tsx: fix check-email, register, verify-email, resend-otp paths - login.tsx: fix check-email, login, resend-otp, verify-email paths - forgot-password.tsx: fix forgot-password, reset-password paths - contact.tsx: fix support/tickets path The gateway expects /api/auth/... but frontend was calling /api/gateway/api/auth/...
This commit is contained in:
parent
34f46f09bd
commit
bb6db6c166
4 changed files with 11 additions and 11 deletions
|
|
@ -158,7 +158,7 @@ export default function ContactPage() {
|
|||
"Job Seeker (Apply jobs)": "GENERAL",
|
||||
};
|
||||
const category = userTypeToCategory[values().userType] || "GENERAL";
|
||||
const res = await fetch("/api/gateway/api/support/tickets", {
|
||||
const res = await fetch("/api/support/tickets", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default function ForgotPasswordRoute() {
|
|||
}
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const res = await fetch('/api/gateway/api/auth/forgot-password', {
|
||||
const res = await fetch('/api/auth/forgot-password', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ email: email().trim().toLowerCase() }),
|
||||
|
|
@ -82,7 +82,7 @@ export default function ForgotPasswordRoute() {
|
|||
}
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const res = await fetch('/api/gateway/api/auth/reset-password', {
|
||||
const res = await fetch('/api/auth/reset-password', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ export default function LoginRoute() {
|
|||
}
|
||||
setCheckingRole(true);
|
||||
try {
|
||||
const response = await fetch("/api/gateway/api/auth/check-email", {
|
||||
const response = await fetch("/api/auth/check-email", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
@ -207,7 +207,7 @@ export default function LoginRoute() {
|
|||
}
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const res = await fetch("/api/gateway/api/auth/login", {
|
||||
const res = await fetch("/api/auth/login", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
@ -262,7 +262,7 @@ export default function LoginRoute() {
|
|||
setError("");
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const res = await fetch("/api/gateway/api/auth/resend-otp", {
|
||||
const res = await fetch("/api/auth/resend-otp", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
@ -286,7 +286,7 @@ export default function LoginRoute() {
|
|||
}
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const verifyRes = await fetch("/api/gateway/api/auth/verify-email", {
|
||||
const verifyRes = await fetch("/api/auth/verify-email", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ export default function SignupRoute() {
|
|||
}
|
||||
|
||||
try {
|
||||
const response = await fetch("/api/gateway/api/auth/check-email", {
|
||||
const response = await fetch("/api/auth/check-email", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
@ -204,7 +204,7 @@ export default function SignupRoute() {
|
|||
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const res = await fetch("/api/gateway/api/auth/register", {
|
||||
const res = await fetch("/api/auth/register", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
@ -250,7 +250,7 @@ export default function SignupRoute() {
|
|||
}
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const verifyRes = await fetch("/api/gateway/api/auth/verify-email", {
|
||||
const verifyRes = await fetch("/api/auth/verify-email", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
@ -272,7 +272,7 @@ export default function SignupRoute() {
|
|||
setServerError("");
|
||||
setSubmitting(true);
|
||||
try {
|
||||
const res = await fetch("/api/gateway/api/auth/resend-otp", {
|
||||
const res = await fetch("/api/auth/resend-otp", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
||||
credentials: "include",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue