Skip to content

Commit

Permalink
[TM-1536] remove constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
LimberHope committed Dec 2, 2024
1 parent 210ab14 commit f52c0bd
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions apps/job-service/src/jobs/dto/delayed-job.dto.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import { JsonApiAttributes } from "@terramatch-microservices/common/dto/json-api-attributes";
import { JsonApiDto } from "@terramatch-microservices/common/decorators";
import { ApiProperty } from "@nestjs/swagger";
import { DelayedJob } from "@terramatch-microservices/database/entities";

const STATUSES = ["pending", "failed", "succeeded"];
type Status = (typeof STATUSES)[number];

@JsonApiDto({ type: "delayedJobs" })
export class DelayedJobDto extends JsonApiAttributes<DelayedJobDto> {
constructor(job: DelayedJob) {
const { status, statusCode, payload, processed_content, total_content, proccess_message } = job;
super({ status, statusCode, payload, processed_content, total_content, proccess_message });
}

@ApiProperty({
description:
Expand Down

0 comments on commit f52c0bd

Please sign in to comment.