Funcionan todos los select, pendiente el general
This commit is contained in:
@@ -3,6 +3,7 @@ import axios, { AxiosError, AxiosResponse } from "axios";
|
||||
import { Result } from "sim-shared/domain/Result.js";
|
||||
import { env } from "#config/env/env.js";
|
||||
import { HttpClient } from "sim-shared/infrastructure/HTTPClient.js";
|
||||
import https from "https"
|
||||
|
||||
export class AlaiRepository {
|
||||
constructor(
|
||||
@@ -30,7 +31,7 @@ export class AlaiRepository {
|
||||
}
|
||||
}
|
||||
|
||||
public static async login(): Promise<Result<string, AlaiAPI.LoginResponseDTO>> {
|
||||
public static async login(httpsAgent: https.Agent): Promise<Result<string, AlaiAPI.LoginResponseDTO>> {
|
||||
const alaiUrl = env.ALAI_API_URL
|
||||
const endpoint = "/v1/auth/login"
|
||||
const fullUrl = alaiUrl + endpoint
|
||||
@@ -41,7 +42,7 @@ export class AlaiRepository {
|
||||
}
|
||||
|
||||
try {
|
||||
const loginRes = await axios.post<AlaiAPI.LoginResponseDTO>(fullUrl, data)
|
||||
const loginRes = await axios.post<AlaiAPI.LoginResponseDTO>(fullUrl, data, { httpsAgent })
|
||||
return {
|
||||
data: loginRes.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user