katoikia-app/api-gateway/src/app.controller.ts

31 lines
838 B
TypeScript
Raw Normal View History

2022-06-29 09:23:07 +00:00
import { Controller, Get, Post, Body, Param } from '@nestjs/common';
2022-06-29 02:30:10 +00:00
import { AppService } from "./app.service";
@Controller()
export class AppController {
2022-06-29 09:23:07 +00:00
constructor(private readonly appService: AppService) { }
2022-06-29 02:30:10 +00:00
2022-06-29 09:23:07 +00:00
//#API orderService - create order
@Post('user/create')
createUser(
@Body('dni') dni: string,
@Body('name') name: string,
@Body('last_name') last_name: string,
@Body('email') email: string,
@Body('phone') phone: number,
@Body('password') password: string,
@Body('user_type') user_type: string,
@Body('user_type') status: string,
@Body('user_type') date_entry: Date,
) {
return this.appService.createUser(dni, name, last_name, email, phone, password,
user_type, status, date_entry);
2022-06-29 02:30:10 +00:00
}
2022-06-29 09:23:07 +00:00
@Get('user/all')
allUsers() {
return this.appService.allUsers();
}
2022-06-29 02:30:10 +00:00
}