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",
|
"singleQuote": true,
|
||||||
"tabWidth": 2,
|
"trailingComma": "all"
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true
|
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,7 @@ async function bootstrap() {
|
|||||||
app.useGlobalPipes(
|
app.useGlobalPipes(
|
||||||
new ValidationPipe({
|
new ValidationPipe({
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
// eslint-disable-next-line prettier/prettier
|
}),
|
||||||
})
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await app.listen(process.env.PORT || 3000);
|
await app.listen(process.env.PORT || 3000);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable prettier/prettier */
|
|
||||||
import {
|
import {
|
||||||
Body,
|
Body,
|
||||||
Controller,
|
Controller,
|
||||||
@ -36,7 +35,7 @@ export class OfferController {
|
|||||||
createRole(
|
createRole(
|
||||||
@Body()
|
@Body()
|
||||||
dto: OfferDto,
|
dto: OfferDto,
|
||||||
@GetUser() user: User
|
@GetUser() user: User,
|
||||||
) {
|
) {
|
||||||
return this.offerService.createOffer(user.id, dto);
|
return this.offerService.createOffer(user.id, dto);
|
||||||
}
|
}
|
||||||
@ -46,7 +45,7 @@ export class OfferController {
|
|||||||
editOfferById(
|
editOfferById(
|
||||||
@Param('id') offerId: string,
|
@Param('id') offerId: string,
|
||||||
@Body() dto: OfferDto,
|
@Body() dto: OfferDto,
|
||||||
@GetUser() user: User
|
@GetUser() user: User,
|
||||||
) {
|
) {
|
||||||
return this.offerService.editOfferById(user.id, offerId, dto);
|
return this.offerService.editOfferById(user.id, offerId, dto);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable prettier/prettier */
|
|
||||||
import {
|
import {
|
||||||
Body,
|
Body,
|
||||||
Controller,
|
Controller,
|
||||||
@ -35,7 +34,7 @@ export class TradeController {
|
|||||||
// @GetUser() user: User,
|
// @GetUser() user: User,
|
||||||
@Body()
|
@Body()
|
||||||
dto: TradeDto,
|
dto: TradeDto,
|
||||||
@GetUser() user: User
|
@GetUser() user: User,
|
||||||
) {
|
) {
|
||||||
return this.tradeService.createTrade(user.id, dto);
|
return this.tradeService.createTrade(user.id, dto);
|
||||||
}
|
}
|
||||||
@ -45,7 +44,7 @@ export class TradeController {
|
|||||||
editPromoCodeById(
|
editPromoCodeById(
|
||||||
@Param('id') promoCodeId: string,
|
@Param('id') promoCodeId: string,
|
||||||
@Body() dto: TradeDto,
|
@Body() dto: TradeDto,
|
||||||
@GetUser() user: User
|
@GetUser() user: User,
|
||||||
) {
|
) {
|
||||||
return this.tradeService.editTradeById(user.id, promoCodeId, dto);
|
return this.tradeService.editTradeById(user.id, promoCodeId, dto);
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,7 @@ export class TradeService {
|
|||||||
const price = crypto.value * dto.amount_traded;
|
const price = crypto.value * dto.amount_traded;
|
||||||
if (buyer.dollarAvailables < price) {
|
if (buyer.dollarAvailables < price) {
|
||||||
throw new ForbiddenException(
|
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 { Body, Controller, Get, UseGuards } from '@nestjs/common';
|
||||||
import { GetUser } from '../auth/decorator';
|
import { GetUser } from '../auth/decorator';
|
||||||
import { JwtGuard } from '../auth/guard';
|
import { JwtGuard } from '../auth/guard';
|
||||||
@ -16,7 +15,7 @@ export class UserController {
|
|||||||
GetMyAssets(
|
GetMyAssets(
|
||||||
@Body()
|
@Body()
|
||||||
@GetUser()
|
@GetUser()
|
||||||
user: User
|
user: User,
|
||||||
) {
|
) {
|
||||||
return this.userService.GetMyAssets(user.id);
|
return this.userService.GetMyAssets(user.id);
|
||||||
}
|
}
|
||||||
@ -24,7 +23,7 @@ export class UserController {
|
|||||||
GetMyTrades(
|
GetMyTrades(
|
||||||
@Body()
|
@Body()
|
||||||
@GetUser()
|
@GetUser()
|
||||||
user: User
|
user: User,
|
||||||
) {
|
) {
|
||||||
return this.userService.GetMyTrades(user.id);
|
return this.userService.GetMyTrades(user.id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user