chore: Install project dependencies.
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
This commit is contained in:
23
backend/src/tenants/tenants.controller.ts
Normal file
23
backend/src/tenants/tenants.controller.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Controller, Get, Post, Body, Param } from '@nestjs/common';
|
||||
import { TenantsService } from './tenants.service';
|
||||
import { Tenant } from './tenant.entity';
|
||||
|
||||
@Controller('tenants')
|
||||
export class TenantsController {
|
||||
constructor(private readonly tenantsService: TenantsService) { }
|
||||
|
||||
@Post()
|
||||
create(@Body('name') name: string): Promise<Tenant> {
|
||||
return this.tenantsService.create(name);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll(): Promise<Tenant[]> {
|
||||
return this.tenantsService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string): Promise<Tenant | null> {
|
||||
return this.tenantsService.findOne(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user