Skip to content

Commit

Permalink
update api history admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-MinhVu committed Dec 20, 2023
1 parent 795c948 commit 8469012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
6 changes: 2 additions & 4 deletions src/database/repositories/event-log.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ export class EventLogRepository extends BaseRepository<EventLog> {

public async getHistories(options) {
const queryBuilder = this.createQb();
queryBuilder
.andWhere(`${this.alias}.status IN (:...status)`, { status: [EEventStatus.PROCESSING, EEventStatus.FAILED] })
if(options.address) {
queryBuilder
.andWhere(`${this.alias}.sender_address = :address`, { address: options.address})
}

if(options.status) {
queryBuilder
.andWhere(`${this.alias}.status = :status`, { status: options.status})
}
this.queryBuilderAddPagination(queryBuilder, options);
return queryBuilder.getManyAndCount();
}
Expand Down
9 changes: 0 additions & 9 deletions src/modules/users/dto/history-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,4 @@ export class getHistoryDto extends BasePaginationRequestDto {
@IsString()
@Expose()
address: string;

@ApiProperty({
required: false,
enum: EEventStatus,

})
@IsOptional()
@Expose()
status: EEventStatus;
}

0 comments on commit 8469012

Please sign in to comment.