CityTracker/client/src/api/auth.ts
Claudio Schaad 3debb1ce1e Add CityTracker v1: map-based city tracker with multi-user support
React/Vite frontend and Express/SQLite backend for tracking visited and
planned cities on a map, with per-city notes, photos, links, and
participant-based sharing between family members. Includes session auth
with admin-managed user accounts, an OSM/Nominatim geocoding proxy, and a
single-image Docker deployment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-20 20:29:25 +02:00

22 lines
579 B
TypeScript

import type { User, SetupStatus } from '@citytracker/shared';
import { api } from './client';
export function login(username: string, password: string) {
return api.post<User>('/auth/login', { username, password });
}
export function logout() {
return api.post<void>('/auth/logout');
}
export function fetchMe() {
return api.get<User>('/auth/me');
}
export function fetchSetupStatus() {
return api.get<SetupStatus>('/auth/setup-status');
}
export function setup(username: string, password: string) {
return api.post<User>('/auth/setup', { username, password });
}