Refactor hostname to become baseurl

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-30 19:41:15 +01:00
parent 27a9858ec0
commit 896e6e0736
29 changed files with 657 additions and 153 deletions

View File

@@ -111,7 +111,7 @@ export default function ConfirmEmailPage() {
<p className="text-green-600 dark:text-green-400">
{__("Your email has been confirmed successfully!")}
</p>
<Button onClick={() => navigate("/authentication/login")} className="w-full">
<Button onClick={() => navigate("/auth/login")} className="w-full">
{__("Proceed to Login")}
</Button>
</div>
@@ -141,7 +141,7 @@ export default function ConfirmEmailPage() {
{!isConfirmed && (
<p className="text-sm text-txt-tertiary">
<Link
to="/authentication/login"
to="/auth/login"
className="underline text-txt-primary hover:text-txt-secondary"
>
{__("Back to Login")}

View File

@@ -23,7 +23,7 @@ export default function ForgotPasswordPage() {
const onSubmit = handleSubmit(async (data) => {
const response = await fetch(
buildEndpoint("/auth/forget-password"),
buildEndpoint("/connect/forget-password"),
{
method: "POST",
headers: {
@@ -81,7 +81,7 @@ export default function ForgotPasswordPage() {
<p className="text-sm text-txt-tertiary">
{__("Remember your password?")}{" "}
<Link
to="/authentication/login"
to="/auth/login"
className="underline text-txt-primary hover:text-txt-secondary"
>
{__("Back to login")}
@@ -124,7 +124,7 @@ export default function ForgotPasswordPage() {
<p className="text-sm text-txt-tertiary">
{__("Remember your password?")}{" "}
<Link
to="/authentication/login"
to="/auth/login"
className="underline text-txt-primary hover:text-txt-secondary"
>
{__("Back to login")}

View File

@@ -33,7 +33,7 @@ export default function LoginPage() {
setIsLoading(true);
try {
const res = await fetch(buildEndpoint("/auth/login"), {
const res = await fetch(buildEndpoint("/connect/login"), {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -68,7 +68,7 @@ export default function LoginPage() {
setIsChecking(true);
try {
const res = await fetch(buildEndpoint("/auth/check-sso"), {
const res = await fetch(buildEndpoint("/connect/check-sso"), {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -85,7 +85,7 @@ export default function LoginPage() {
if (data.ssoAvailable && data.samlConfigId) {
window.location.href = buildEndpoint(
`/auth/saml/login/${data.samlConfigId}`
`/connect/saml/login/${data.samlConfigId}`
);
} else {
throw new Error(__("SSO not available for this email domain"));
@@ -146,7 +146,7 @@ export default function LoginPage() {
<div className="text-center mt-6 text-sm text-txt-secondary">
{__("Don't have an account ?")}{" "}
<Link to="/authentication/register" className="underline hover:text-txt-primary">
<Link to="/auth/register" className="underline hover:text-txt-primary">
{__("Register")}
</Link>
</div>
@@ -154,7 +154,7 @@ export default function LoginPage() {
<div className="text-center text-sm text-txt-secondary">
{__("Forgot password?")}{" "}
<Link
to="/authentication/forgot-password"
to="/auth/forgot-password"
className="underline hover:text-txt-primary"
>
{__("Reset password")}
@@ -206,7 +206,7 @@ export default function LoginPage() {
<div className="text-center mt-6 text-sm text-txt-secondary">
{__("Don't have an account ?")}{" "}
<Link to="/authentication/register" className="underline hover:text-txt-primary">
<Link to="/auth/register" className="underline hover:text-txt-primary">
{__("Register")}
</Link>
</div>
@@ -214,7 +214,7 @@ export default function LoginPage() {
<div className="text-center text-sm text-txt-secondary">
{__("Forgot password?")}{" "}
<Link
to="/authentication/forgot-password"
to="/auth/forgot-password"
className="underline hover:text-txt-primary"
>
{__("Reset password")}
@@ -257,7 +257,7 @@ export default function LoginPage() {
<div className="text-center mt-6 text-sm text-txt-secondary">
{__("Don't have an account ?")}{" "}
<Link to="/authentication/register" className="underline hover:text-txt-primary">
<Link to="/auth/register" className="underline hover:text-txt-primary">
{__("Register")}
</Link>
</div>

View File

@@ -26,7 +26,7 @@ export default function RegisterPage() {
const onSubmit = handleSubmit(async (data) => {
const response = await fetch(
buildEndpoint("/auth/register"),
buildEndpoint("/connect/register"),
{
method: "POST",
headers: {
@@ -106,7 +106,7 @@ export default function RegisterPage() {
<p className="text-sm text-txt-tertiary">
{__("Already have an account?")}{" "}
<Link
to="/authentication/login"
to="/auth/login"
className="underline text-txt-primary hover:text-txt-secondary"
>
{__("Log in here")}

View File

@@ -44,7 +44,7 @@ export default function ResetPasswordPage() {
}
const response = await fetch(
buildEndpoint("/auth/reset-password"),
buildEndpoint("/connect/reset-password"),
{
method: "POST",
headers: {
@@ -74,7 +74,7 @@ export default function ResetPasswordPage() {
description: __("Password reset successfully"),
variant: "success",
});
navigate("/authentication/login", { replace: true });
navigate("/auth/login", { replace: true });
});
usePageTitle(__("Reset password"));
@@ -118,7 +118,7 @@ export default function ResetPasswordPage() {
<p className="text-sm text-txt-tertiary">
{__("Remember your password?")}{" "}
<Link
to="/authentication/login"
to="/auth/login"
className="underline text-txt-primary hover:text-txt-secondary"
>
{__("Log in here")}

View File

@@ -51,7 +51,7 @@ export default function SignupFromInvitationPage() {
}
const response = await fetch(
buildEndpoint("/auth/signup-from-invitation"),
buildEndpoint("/connect/signup-from-invitation"),
{
method: "POST",
headers: {
@@ -125,7 +125,7 @@ export default function SignupFromInvitationPage() {
<p className="text-sm text-txt-tertiary">
{__("Already have an account?")}{" "}
<Link
to="/authentication/login"
to="/auth/login"
className="underline text-txt-primary hover:text-txt-secondary"
>
{__("Log in here")}