src/wallet/wallet.controller.ts
api/v1/wallet
Methods |
| create | ||||||
create(createWalletDto: CreateWalletDto)
|
||||||
Decorators :
@Post('/')
|
||||||
|
Defined in src/wallet/wallet.controller.ts:23
|
||||||
|
Parameters :
Returns :
any
|
| findAll |
findAll()
|
Decorators :
@Get('/')
|
|
Defined in src/wallet/wallet.controller.ts:28
|
|
Returns :
any
|
| findOne | ||||||
findOne(id: string)
|
||||||
Decorators :
@Get('/:id')
|
||||||
|
Defined in src/wallet/wallet.controller.ts:33
|
||||||
|
Parameters :
Returns :
any
|
| update | |||||||||
update(id: string, updateWalletDto: UpdateWalletDto)
|
|||||||||
Decorators :
@Put('/:id/label')
|
|||||||||
|
Defined in src/wallet/wallet.controller.ts:38
|
|||||||||
|
Parameters :
Returns :
any
|
import {
Body,
Controller,
Get,
Param,
Post,
Put,
UseGuards,
} from "@nestjs/common";
import { AuthGuard } from "@nestjs/passport";
import { CreateWalletDto } from "./dto/create-wallet.dto";
import { UpdateWalletDto } from "./dto/update-wallet.dto";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { WalletService } from "./wallet.service";
@UseGuards(AuthGuard("jwt"))
@Controller("api/v1/wallet")
export class WalletController {
constructor(private readonly walletService: WalletService) {}
@Post("/")
create(@Body() createWalletDto: CreateWalletDto) {
return this.walletService.create(createWalletDto);
}
@Get("/")
findAll() {
return this.walletService.findAll();
}
@Get("/:id")
findOne(@Param("id") id: string) {
return this.walletService.findOne(id);
}
@Put("/:id/label")
update(@Param("id") id: string, @Body() updateWalletDto: UpdateWalletDto) {
return this.walletService.update(id, updateWalletDto);
}
}