mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
refactor(nestjs): wip
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Body, Controller, Post } from '@nestjs/common';
|
||||
import { PlaidApplication } from './PlaidApplication';
|
||||
import { PlaidItemDto } from './dtos/PlaidItem.dto';
|
||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
|
||||
@Controller('banking/plaid')
|
||||
@ApiTags('banking-plaid')
|
||||
export class BankingPlaidController {
|
||||
constructor(private readonly plaidApplication: PlaidApplication) {}
|
||||
|
||||
@Post('link-token')
|
||||
@ApiOperation({ summary: 'Get Plaid link token' })
|
||||
getLinkToken() {
|
||||
return this.plaidApplication.getLinkToken();
|
||||
}
|
||||
|
||||
@Post('exchange-token')
|
||||
@ApiOperation({ summary: 'Exchange Plaid access token' })
|
||||
exchangeToken(@Body() itemDTO: PlaidItemDto) {
|
||||
return this.plaidApplication.exchangeToken(itemDTO);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user