#23: users table + insert/update added
This commit is contained in:
15
api/src/app/user.controller.ts
Normal file
15
api/src/app/user.controller.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// user.controller.ts
|
||||
import { Body, Controller, Post } from '@nestjs/common';
|
||||
import type { InsertUser } from '../db/schema';
|
||||
import { DrizzleService } from './drizzle.service';
|
||||
|
||||
@Controller('users')
|
||||
export class UserController {
|
||||
constructor(private readonly drizzleService: DrizzleService) {}
|
||||
|
||||
@Post()
|
||||
async createUser(@Body() createUserDto: InsertUser) {
|
||||
// Hier kannst du zusätzliche Validierungen oder Logik einbauen.
|
||||
return await this.drizzleService.logIn(createUserDto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user