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>
22 lines
579 B
TypeScript
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 });
|
|
}
|