initial: standalone repo from monorepo split

This commit is contained in:
kevin-asprec
2026-04-13 09:37:07 +08:00
commit 5382f3b4e5
87 changed files with 5278 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { Controller, Get, Patch, Param, Body, Query } from '@nestjs/common';
import { UsersService } from './users.service';
@Controller('users')
export class UsersController {
constructor(private readonly service: UsersService) {}
@Get()
findAll(
@Query('search') search?: string,
@Query('tenantId') tenantId?: string,
@Query('page') page?: number,
@Query('limit') limit?: number,
) {
return this.service.findAll({ search, tenantId, page, limit });
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.service.findOne(id);
}
@Patch(':id')
update(
@Param('id') id: string,
@Body() dto: { isActive?: boolean; firstName?: string; lastName?: string },
) {
return this.service.update(id, dto);
}
@Patch(':id/reset-password')
resetPassword(@Param('id') id: string, @Body() dto: { password: string }) {
return this.service.resetPassword(id, dto.password);
}
}