Skip to content

Commit 12f9ba2

Browse files
Mikadowsangristan
authored andcommitted
fix: inline return get by id
1 parent 8ee0fc1 commit 12f9ba2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/benchmarks/benchmark.controller.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BenchmarkService } from 'src/benchmarks/benchmark.service';
44
import { Benchmark } from './benchmark.entity';
55
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
66
import { ValidatedJWTReq } from '../auth/dto/validated-jwt-req';
7-
import { ApiBadRequestResponse, ApiOkResponse, ApiOperation } from '@nestjs/swagger';
7+
import { ApiOkResponse, ApiOperation } from '@nestjs/swagger';
88
import { BenchmarkIdDto } from './dto/benchmarkId.dto';
99

1010

@@ -37,9 +37,7 @@ export class BenchmarkController {
3737
@ApiOkResponse({type: Benchmark, description: 'Requested benchmark'})
3838
@Get(':id')
3939
async getBenchmarkById(@Param() id: BenchmarkIdDto): Promise<Benchmark | undefined> {
40-
const benchmark = await this.benchmarkService.findOne(id);
41-
42-
return benchmark;
40+
return this.benchmarkService.findOne(id);
4341
}
4442

4543

0 commit comments

Comments
 (0)