mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-08 21:50:13 +02:00
fixed prettier issues
This commit is contained in:
parent
7648b6432a
commit
5b2056295f
@ -1,6 +1,4 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
@ -18,8 +18,7 @@ async function bootstrap() {
|
||||
app.useGlobalPipes(
|
||||
new ValidationPipe({
|
||||
whitelist: true,
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
await app.listen(process.env.PORT || 3000);
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable prettier/prettier */
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
@ -36,7 +35,7 @@ export class OfferController {
|
||||
createRole(
|
||||
@Body()
|
||||
dto: OfferDto,
|
||||
@GetUser() user: User
|
||||
@GetUser() user: User,
|
||||
) {
|
||||
return this.offerService.createOffer(user.id, dto);
|
||||
}
|
||||
@ -46,7 +45,7 @@ export class OfferController {
|
||||
editOfferById(
|
||||
@Param('id') offerId: string,
|
||||
@Body() dto: OfferDto,
|
||||
@GetUser() user: User
|
||||
@GetUser() user: User,
|
||||
) {
|
||||
return this.offerService.editOfferById(user.id, offerId, dto);
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable prettier/prettier */
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
@ -35,7 +34,7 @@ export class TradeController {
|
||||
// @GetUser() user: User,
|
||||
@Body()
|
||||
dto: TradeDto,
|
||||
@GetUser() user: User
|
||||
@GetUser() user: User,
|
||||
) {
|
||||
return this.tradeService.createTrade(user.id, dto);
|
||||
}
|
||||
@ -45,7 +44,7 @@ export class TradeController {
|
||||
editPromoCodeById(
|
||||
@Param('id') promoCodeId: string,
|
||||
@Body() dto: TradeDto,
|
||||
@GetUser() user: User
|
||||
@GetUser() user: User,
|
||||
) {
|
||||
return this.tradeService.editTradeById(user.id, promoCodeId, dto);
|
||||
}
|
||||
|
@ -48,8 +48,7 @@ export class TradeService {
|
||||
const price = crypto.value * dto.amount_traded;
|
||||
if (buyer.dollarAvailables < price) {
|
||||
throw new ForbiddenException(
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
`Acqueror ${buyer.pseudo} doesnt have enough money to make this trade`
|
||||
`Acqueror ${buyer.pseudo} doesnt have enough money to make this trade`,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable prettier/prettier */
|
||||
import { Body, Controller, Get, UseGuards } from '@nestjs/common';
|
||||
import { GetUser } from '../auth/decorator';
|
||||
import { JwtGuard } from '../auth/guard';
|
||||
@ -16,7 +15,7 @@ export class UserController {
|
||||
GetMyAssets(
|
||||
@Body()
|
||||
@GetUser()
|
||||
user: User
|
||||
user: User,
|
||||
) {
|
||||
return this.userService.GetMyAssets(user.id);
|
||||
}
|
||||
@ -24,7 +23,7 @@ export class UserController {
|
||||
GetMyTrades(
|
||||
@Body()
|
||||
@GetUser()
|
||||
user: User
|
||||
user: User,
|
||||
) {
|
||||
return this.userService.GetMyTrades(user.id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user