chore: strengthen backend eslint profile
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { InvestmentReadQueryDto } from '../../../investment-resource.dto';
|
||||
import type { Request } from 'express';
|
||||
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
@@ -9,24 +10,25 @@ import {
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||
import type { Request } from 'express';
|
||||
|
||||
import { ApiProblemResponses } from '../../../../../common/decorators/api-safe-error-response.decorator';
|
||||
import { AccessPayload, JwtAuthGuard } from '../../../../auth/auth.api';
|
||||
import { InvestmentReadQueryDto } from '../../../investment-resource.dto';
|
||||
import { BondCatalogService } from '../application/bond-catalog.service';
|
||||
import { BondIncomeService } from '../application/bond-income.service';
|
||||
import { BondMarketService } from '../application/bond-market.service';
|
||||
import {
|
||||
BondCandlesResourceDto,
|
||||
BondCandlesQueryDto,
|
||||
BondCandlesResourceDto,
|
||||
BondCouponsResourceDto,
|
||||
BondResourceDto,
|
||||
BondMetricsResourceDto,
|
||||
BondPositionResourceDto,
|
||||
BondQuoteResourceDto,
|
||||
BondResourceDto,
|
||||
BondSearchQueryDto,
|
||||
BondSearchResourceDto,
|
||||
BondTickerParamsDto,
|
||||
} from './bond.dto';
|
||||
import { BondCatalogService } from '../application/bond-catalog.service';
|
||||
|
||||
@ApiTags('bonds')
|
||||
@ApiProblemResponses()
|
||||
@@ -39,6 +41,7 @@ export class BondController {
|
||||
private readonly market: BondMarketService,
|
||||
private readonly income: BondIncomeService,
|
||||
) {}
|
||||
|
||||
@Get(':uid/metrics')
|
||||
@ApiOkResponse({ type: BondMetricsResourceDto })
|
||||
metrics(
|
||||
@@ -48,6 +51,7 @@ export class BondController {
|
||||
) {
|
||||
return this.income.metrics(request.user.sub, uid, query.sync === 'observe');
|
||||
}
|
||||
|
||||
@Get()
|
||||
@ApiOkResponse({ type: BondSearchResourceDto })
|
||||
search(
|
||||
@@ -60,6 +64,7 @@ export class BondController {
|
||||
query.sync === 'observe',
|
||||
);
|
||||
}
|
||||
|
||||
@Get('by-ticker/:ticker')
|
||||
@ApiOkResponse({ type: BondResourceDto })
|
||||
getByTicker(
|
||||
@@ -73,6 +78,7 @@ export class BondController {
|
||||
query.sync === 'observe',
|
||||
);
|
||||
}
|
||||
|
||||
@Get(':uid')
|
||||
@ApiOkResponse({ type: BondResourceDto })
|
||||
get(
|
||||
@@ -82,6 +88,7 @@ export class BondController {
|
||||
) {
|
||||
return this.bonds.get(request.user.sub, uid, query.sync === 'observe');
|
||||
}
|
||||
|
||||
@Get(':uid/quote')
|
||||
@ApiOkResponse({ type: BondQuoteResourceDto })
|
||||
quote(
|
||||
@@ -91,6 +98,7 @@ export class BondController {
|
||||
) {
|
||||
return this.market.quote(request.user.sub, uid, query.sync === 'observe');
|
||||
}
|
||||
|
||||
@Get(':uid/candles')
|
||||
@ApiOkResponse({ type: BondCandlesResourceDto })
|
||||
candles(
|
||||
@@ -105,6 +113,7 @@ export class BondController {
|
||||
query.sync === 'observe',
|
||||
);
|
||||
}
|
||||
|
||||
@Get(':uid/position')
|
||||
@ApiOkResponse({ type: BondPositionResourceDto })
|
||||
position(
|
||||
@@ -118,6 +127,7 @@ export class BondController {
|
||||
query.sync === 'observe',
|
||||
);
|
||||
}
|
||||
|
||||
@Get(':uid/coupons')
|
||||
@ApiOkResponse({ type: BondCouponsResourceDto })
|
||||
coupons(
|
||||
|
||||
Reference in New Issue
Block a user