subpath feature

This commit is contained in:
Lucas Winther committed 2026-07-10 10:13:37 +02:00
1 parent 2d668b3fb8
commit 076efc2101
11 files changed
+32 -31

No files matched your search

+4 -4
View File
@@ -122,7 +122,7 @@ export function login(
password: string,
fetchFn: FetchLike = defaultFetch,
): Promise<AuthUser> {
return requestUser(fetchFn, "/api/auth/login", { username, password });
return requestUser(fetchFn, "api/auth/login", { username, password });
}
/** POST /api/auth/register → user (auto signed in), or throws (400/409). */
@@ -131,7 +131,7 @@ export function register(
password: string,
fetchFn: FetchLike = defaultFetch,
): Promise<AuthUser> {
return requestUser(fetchFn, "/api/auth/register", { username, password });
return requestUser(fetchFn, "api/auth/register", { username, password });
}
/** Result of the startup /me probe (fetchAuthStatus). */
@@ -158,7 +158,7 @@ export async function fetchAuthStatus(
fetchFn: FetchLike = defaultFetch,
): Promise<AuthStatus> {
try {
const response = await fetchFn("/api/auth/me", {
const response = await fetchFn("api/auth/me", {
method: "GET",
credentials: "same-origin",
});
@@ -179,7 +179,7 @@ export async function fetchAuthStatus(
*/
export async function logout(fetchFn: FetchLike = defaultFetch): Promise<void> {
try {
await fetchFn("/api/auth/logout", {
await fetchFn("api/auth/logout", {
method: "POST",
credentials: "same-origin",
});