28 lines
852 B
TypeScript
28 lines
852 B
TypeScript
import { Controller, Get, Param } from "@nestjs/common";
|
|
import { AccountMemoService } from "src/customer-support/accounts/services/account-memo.service";
|
|
import { AccountService } from "src/customer-support/accounts/services/account.service";
|
|
|
|
|
|
@Controller('accounts')
|
|
export class AccountController {
|
|
constructor(
|
|
private readonly accountService: AccountService,
|
|
private readonly memoService: AccountMemoService,
|
|
) { }
|
|
|
|
@Get()
|
|
findAllAccounts() {
|
|
return this.accountService.findAllAccounts();
|
|
}
|
|
|
|
@Get('account/:id')
|
|
findAccountById(@Param('accountId') accountId: number) {
|
|
return this.accountService.findAccountById(accountId);
|
|
}
|
|
|
|
@Get(':id')
|
|
findMemosByAccountId(@Param('accountId') accountId: number) {
|
|
return this.memoService.findMemosByAccountId(accountId);
|
|
}
|
|
|
|
} |