forked from Yara724/api
Fix SMS, and added pagination+sorting+searching for GETs
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
Req,
|
||||
UploadedFile,
|
||||
UploadedFiles,
|
||||
@@ -39,6 +40,8 @@ import {
|
||||
CarBodyFormDto,
|
||||
} from "./dto/create-request-management.dto";
|
||||
import { RequestManagementService } from "./request-management.service";
|
||||
import { ListQueryV2Dto } from "src/common/dto/list-query-v2.dto";
|
||||
import { GetUserBlameListV2ResponseDto } from "./dto/blame-list-user-v2.dto";
|
||||
|
||||
/**
|
||||
* V2 API surface for the redesigned `BlameRequest` model.
|
||||
@@ -71,10 +74,16 @@ export class RequestManagementV2Controller {
|
||||
|
||||
@Get()
|
||||
@Roles(RoleEnum.USER, RoleEnum.FIELD_EXPERT)
|
||||
@ApiOperation({
|
||||
summary: "List my blame requests (V2)",
|
||||
description:
|
||||
"All blame files for the current user. Optional query: `search`, `sortBy` (publicId | createdAt | requestNo | status), `sortOrder`, `page`, `limit`. Without `page`/`limit`, returns the full filtered list.",
|
||||
})
|
||||
async getAllBlameRequestsV2(
|
||||
@CurrentUser() user: any,
|
||||
) {
|
||||
return this.requestManagementService.getAllBlameRequestsV2(user);
|
||||
@Query() query: ListQueryV2Dto,
|
||||
): Promise<GetUserBlameListV2ResponseDto> {
|
||||
return this.requestManagementService.getAllBlameRequestsV2(user, query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user