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
643 B
TypeScript
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}`);
|
|
}
|