add authentication with login form and token management

This commit is contained in:
Egor Pozharov
2026-04-16 12:47:42 +06:00
parent be0b13acbf
commit c373d82135
8 changed files with 262 additions and 6 deletions

View File

@@ -28,3 +28,18 @@ export const statusLabels: Record<DeliveryStatus, string> = {
new: 'Новое',
delivered: 'Доставлено',
};
// Auth types
export interface LoginRequest {
username: string;
password: string;
}
export interface LoginResponse {
token: string;
}
export interface User {
id: string;
username: string;
}