fix
This commit is contained in:
@@ -12,6 +12,7 @@ post {
|
||||
|
||||
body:form-urlencoded {
|
||||
iccid: 8933201125065160380
|
||||
~offer: SAVEFAMILY1
|
||||
}
|
||||
|
||||
settings {
|
||||
|
||||
@@ -5,13 +5,13 @@ meta {
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{actionsUrl}}/massActions?massActionId=5192767
|
||||
url: {{actionsUrl}}/massActions?massActionId=5363116
|
||||
body: formUrlEncoded
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
params:query {
|
||||
massActionId: 5192767
|
||||
massActionId: 5363116
|
||||
~identifier.identifierType: ICCID
|
||||
~identifier.identifiers: 8933201125065160463,8933201125065160422
|
||||
}
|
||||
|
||||
@@ -199,16 +199,29 @@ export class SimUseCases {
|
||||
}
|
||||
}
|
||||
|
||||
public reActivate(pauseData: ActionData): () => Promise<Result<string, boolean>> {
|
||||
public reActivate(reactivateData: ActionData): () => Promise<Result<string, boolean>> {
|
||||
const OPERATION_URL = "/actions/reactivateLine"
|
||||
return async () => {
|
||||
const req = this.httpClient.client.post(OPERATION_URL, {
|
||||
...pauseData
|
||||
...reactivateData
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await req
|
||||
|
||||
// Creacion de la operacion inicial, antes de tener los datos
|
||||
const operation: ObjeniousOperation = {
|
||||
operation: "reactivate",
|
||||
iccids: reactivateData.identifier.identifiers[0],
|
||||
status: "noMassID",
|
||||
request_id: response.data.requestId,
|
||||
correlation_id: reactivateData.correlation_id
|
||||
}
|
||||
|
||||
// TODO: Esto tiene poco sentido si la operacion ya se
|
||||
// tenia que haber creado en el generador
|
||||
this.logOperation(operation)
|
||||
.then().catch(e => console.error("Error login operation", e))
|
||||
if (response.status == 200) {
|
||||
console.log("[o] Sim solicitud de reactivacion ", response.data)
|
||||
return <Result<string, boolean>>{
|
||||
@@ -224,7 +237,7 @@ export class SimUseCases {
|
||||
} catch (error) {
|
||||
console.error("[x] Error reactivacion", (error as AxiosError).response?.status)
|
||||
return <Result<string, boolean>>{
|
||||
error: "Error reactivando la sim" + pauseData.identifier,
|
||||
error: "Error reactivando la sim" + reactivateData.identifier,
|
||||
data: undefined
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user