mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
23 lines
733 B
TypeScript
23 lines
733 B
TypeScript
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);
|
|
}
|
|
}
|