fix(SPG-687) Booking status pending seharusnya bisa di cancel
parent
e38fbc65bd
commit
0b502188af
|
@ -20,7 +20,7 @@ export class CancelTransactionManager extends BaseUpdateStatusManager<Transactio
|
||||||
}
|
}
|
||||||
|
|
||||||
async validateProcess(): Promise<void> {
|
async validateProcess(): Promise<void> {
|
||||||
if (![STATUS.EXPIRED, STATUS.PENDING].includes(this.data.status)) {
|
if (![STATUS.EXPIRED, STATUS.PENDING].includes(this.oldData.status)) {
|
||||||
throw new UnprocessableEntityException({
|
throw new UnprocessableEntityException({
|
||||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||||
message: `Gagal! hanya tranksaksi dengan status ${STATUS.PENDING} dan ${STATUS.EXPIRED} yang dapat di${this.dataStatus}`,
|
message: `Gagal! hanya tranksaksi dengan status ${STATUS.PENDING} dan ${STATUS.EXPIRED} yang dapat di${this.dataStatus}`,
|
||||||
|
|
Loading…
Reference in New Issue