fixed prettier issues

This commit is contained in:
Kevsl 2024-06-07 11:17:55 +02:00
parent 7648b6432a
commit 5b2056295f
6 changed files with 10 additions and 17 deletions

View File

@ -1,6 +1,4 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
"singleQuote": true,
"trailingComma": "all"
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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`,
);
}

View File

@ -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);
}