21 lines
548 B
TypeScript
21 lines
548 B
TypeScript
import { Body, Controller, Get, Post } from '@nestjs/common';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import { TenantService } from './tenant.service';
|
|
import { CreateTenantDto } from './dto/create-tenant.dto';
|
|
|
|
@ApiTags('tenants')
|
|
@Controller('tenants')
|
|
export class TenantController {
|
|
constructor(private readonly tenantService: TenantService) {}
|
|
|
|
@Get()
|
|
findAll() {
|
|
return this.tenantService.findAll();
|
|
}
|
|
|
|
@Post()
|
|
create(@Body() createTenantDto: CreateTenantDto) {
|
|
return this.tenantService.create(createTenantDto);
|
|
}
|
|
}
|