feat: add admin tests read and update endpoints

This commit is contained in:
2026-06-06 13:33:56 +03:30
parent 39e6c96113
commit 28c1a4831e
31 changed files with 330 additions and 101 deletions
+25
View File
@@ -0,0 +1,25 @@
import { Controller, Get, Param, ParseIntPipe } from '@nestjs/common';
import { TestsService } from './providers/tests.service';
import { Public } from '../auth/decorators/public.decorator';
@Controller('tests')
export class TestsController {
constructor(
/**
* Inject Tests Service
*/
private readonly testsService: TestsService,
) {}
@Public()
@Get()
public async getAllTests() {
return await this.testsService.userGetAll();
}
@Public()
@Get(':id')
public async getTestById(@Param('id', ParseIntPipe) id: number) {
return await this.testsService.userGetOne(id);
}
}