CityTracker/client/src/api/users.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
643 B
TypeScript

import type { User, CreateUserInput, UpdateUserInput, ResetPasswordInput } from '@citytracker/shared';
import { api } from './client';
export function listUsers() {
return api.get<User[]>('/users');
}
export function createUser(input: CreateUserInput) {
return api.post<User>('/users', input);
}
export function updateUser(id: number, input: UpdateUserInput) {
return api.patch<User>(`/users/${id}`, input);
}
export function resetPassword(id: number, input: ResetPasswordInput) {
return api.post<void>(`/users/${id}/reset-password`, input);
}
export function deleteUser(id: number) {
return api.delete<void>(`/users/${id}`);
}