import { apiFetch } from './client';

type LoginResponse = {
  token: string;
};

/** Dev uniquement (backend : App\Controller\Api\V1\AuthController::devLogin, 404 hors env dev). */
export function devLogin(email?: string) {
  return apiFetch<LoginResponse>('/auth/dev-login', {
    method: 'POST',
    body: email ? { email } : {},
  });
}
