-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from apurvaubade/DeleteRole_new
UserRole:Delete Userrole API
- Loading branch information
Showing
5 changed files
with
99 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Expose } from "class-transformer"; | ||
import { ApiProperty } from "@nestjs/swagger"; | ||
import { IsArray, IsNotEmpty, IsString, IsUUID } from "class-validator"; | ||
|
||
export class DeleteAssignRoleDto { | ||
@ApiProperty({ | ||
type: String, | ||
description: "User Id of User", | ||
default: "", | ||
}) | ||
@Expose() | ||
// @IsUUID() | ||
userId: string; | ||
|
||
@ApiProperty({ | ||
type: [String], // Define roleId as an array of strings | ||
description: "Assigned Role Id", | ||
default: [], | ||
}) | ||
@IsArray() | ||
@IsString({ each: true }) // Validate each string in the array | ||
// @IsUUID(4, { each: true }) // Specify the UUID version (4) and validate each UUID string in the array | ||
roleId: string[]; | ||
} | ||
|
||
// constructor(obj: any) { | ||
// Object.assign(this, obj); | ||
// } |