feat(auth): add optional authentication guard and extend AuthModule providers
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.
This commit is contained in:
@@ -5,6 +5,7 @@ import { ScheduleModule } from "@nestjs/schedule";
|
||||
import { ThrottlerModule } from "@nestjs/throttler";
|
||||
import { redisStore } from "cache-manager-redis-yet";
|
||||
import { ApiKeysModule } from "./api-keys/api-keys.module";
|
||||
import { AdminModule } from "./admin/admin.module";
|
||||
import { AppController } from "./app.controller";
|
||||
import { AppService } from "./app.service";
|
||||
import { AuthModule } from "./auth/auth.module";
|
||||
@@ -42,6 +43,7 @@ import { UsersModule } from "./users/users.module";
|
||||
SessionsModule,
|
||||
ReportsModule,
|
||||
ApiKeysModule,
|
||||
AdminModule,
|
||||
ScheduleModule.forRoot(),
|
||||
ThrottlerModule.forRootAsync({
|
||||
imports: [ConfigModule],
|
||||
|
||||
Reference in New Issue
Block a user