Add authentication guards and API documentation to admin and restaurant controllers; update restaurant service for soft delete; enhance database seeder with new permissions and roles

This commit is contained in:
2025-11-18 00:37:43 +03:30
parent e2b2a746f7
commit 746769a735
5 changed files with 94 additions and 18 deletions
@@ -1,8 +1,11 @@
import { Controller, Post, Body, HttpCode, HttpStatus, Get } from '@nestjs/common';
import { Controller, Post, Body, HttpCode, HttpStatus, Get, UseGuards } from '@nestjs/common';
import { AdminService } from '../providers/admin.service';
import { CreateAdminDto } from '../dto/create-admin.dto';
import { ApiTags, ApiOperation, ApiBody, ApiResponse } from '@nestjs/swagger';
import { ApiTags, ApiOperation, ApiBody, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@ApiTags('admin')
@Controller('admin')
export class AdminController {