import '../data/api_response.dart';

import 'base_service.dart';
import '../models/login_model.dart';

class LoginService extends BaseService {
  final endPoint = "/admin/iniciar-sesion";

  Future<ApiResponse> logIn(String username, String password) async {
    final login = Login(username: username, password: password);
    var response = await post(endPoint,
        withAuth: false,
        body: login.toJson(),
        headers: {'Content-Type': 'application/json'});
    return ApiResponse(response);
  }
}
