Files
lr-openwrt-tool/src/services/loginApi.ts
T

17 lines
342 B
TypeScript

import { apiRequest } from '@/services/apiClient';
type LoginResponse = {
authenticated: boolean;
};
export const loginApi = {
login(username: string, password: string) {
return apiRequest<LoginResponse>('/api/login', {
method: 'POST',
body: JSON.stringify({
username,
password,
}),
});
},
};