import { apiJson } from './http' export function login(email, password) { return apiJson('/users/login', { method: 'POST', body: JSON.stringify({ email, password }), auth: false, }) } export function signup({ email, password, full_name }) { const body = { email, password } if (full_name?.trim()) body.full_name = full_name.trim() return apiJson('/users', { method: 'POST', body: JSON.stringify(body), auth: false, }) } export function refreshTokens(refresh_token) { return apiJson('/users/refresh', { method: 'POST', body: JSON.stringify({ refresh_token }), auth: false, }) } export function getProfile() { return apiJson('/users/me', { auth: true }) } export function updateProfile(body) { return apiJson('/users/me', { method: 'PATCH', body: JSON.stringify(body), auth: true, }) }