feat: v1.1 - random re-roll, shopping summary, offline PWA, auth prep, profile page

This commit is contained in:
clawd
2026-02-18 10:32:12 +00:00
parent de567f93db
commit c222c880a3
13 changed files with 290 additions and 6 deletions

21
frontend/src/api/auth.ts Normal file
View File

@@ -0,0 +1,21 @@
import { apiFetch } from './client'
// v2: Auth API — placeholder functions
export interface User {
id: string
name: string
email?: string
}
export function login(_email: string, _password: string) {
return apiFetch<User>('/auth/login', { method: 'POST', body: JSON.stringify({ email: _email, password: _password }) })
}
export function register(_email: string, _password: string, _name: string) {
return apiFetch<User>('/auth/register', { method: 'POST', body: JSON.stringify({ email: _email, password: _password, name: _name }) })
}
export function fetchMe() {
return apiFetch<User>('/auth/me')
}