Modelo de activacion de sim con token automatico
This commit is contained in:
@@ -55,6 +55,7 @@ export class SimController {
|
||||
msg: "Error general de activation"
|
||||
}
|
||||
}).send()
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +68,10 @@ export class SimController {
|
||||
|
||||
try {
|
||||
await this.simUseCases.cancelation({ iccid })
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "cancelation"
|
||||
})
|
||||
} catch (err) {
|
||||
console.error("Error cancelando la sim ", req.body)
|
||||
res.status(500).json({
|
||||
@@ -76,10 +81,6 @@ export class SimController {
|
||||
})
|
||||
}
|
||||
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "cancelation"
|
||||
})
|
||||
}
|
||||
|
||||
async pause(req: Request, res: Response) {
|
||||
@@ -92,6 +93,10 @@ export class SimController {
|
||||
|
||||
try {
|
||||
await this.simUseCases.cancelation({ iccid })
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "cancelation"
|
||||
})
|
||||
} catch (err) {
|
||||
console.error("Error pausando la sim ", req.body)
|
||||
res.status(500).json({
|
||||
@@ -100,11 +105,6 @@ export class SimController {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "cancelation"
|
||||
})
|
||||
}
|
||||
|
||||
async free(req: Request, res: Response) {
|
||||
@@ -117,6 +117,10 @@ export class SimController {
|
||||
|
||||
try {
|
||||
await this.simUseCases.cancelation({ iccid })
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "liberacion"
|
||||
})
|
||||
} catch (err) {
|
||||
console.error("Error liberando la sim ", req.body)
|
||||
res.status(500).json({
|
||||
@@ -126,10 +130,6 @@ export class SimController {
|
||||
})
|
||||
}
|
||||
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "liberacion"
|
||||
})
|
||||
}
|
||||
|
||||
async save(req: Request, res: Response) {
|
||||
@@ -142,6 +142,10 @@ export class SimController {
|
||||
|
||||
try {
|
||||
await this.simUseCases.cancelation({ iccid })
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "cancelation"
|
||||
})
|
||||
} catch (err) {
|
||||
console.error("Error activando la sim ", req.body)
|
||||
res.status(500).json({
|
||||
@@ -151,10 +155,6 @@ export class SimController {
|
||||
})
|
||||
}
|
||||
|
||||
res.status(200).json({
|
||||
iccid: iccid,
|
||||
operation: "cancelation"
|
||||
})
|
||||
}
|
||||
|
||||
private validateBody(body: any, res: Response) {
|
||||
|
||||
Reference in New Issue
Block a user