Introduce `OptionalAuthGuard` to allow conditional authentication for routes. Update `AuthModule` to include `AuthGuard`, `OptionalAuthGuard`, and `RolesGuard` in providers and exports for broader reuse. feat(app): integrate `AdminModule` into app module Add `AdminModule` to the app's main module to enable administration functionalities. feat(users): enhance user profiles with bio and avatar fields Extend `UpdateUserDto` to include optional `bio` and `avatarUrl` fields for better user customization. feat(categories): add functionality to count all categories Implement `countAll` method in `CategoriesRepository` to fetch the total number of categories using raw SQL counting.
18 lines
277 B
TypeScript
18 lines
277 B
TypeScript
import { IsOptional, IsString, MaxLength } from "class-validator";
|
|
|
|
export class UpdateUserDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(32)
|
|
displayName?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(255)
|
|
bio?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
avatarUrl?: string;
|
|
}
|