nestjs controller
import { Controller, Get, Post, Body } from '@nestjs/common';
import { CreateCatDto } from './dto/create-cat.dto';
import { CatsService } from './cats.service';
import { Cat } from './interfaces/cat.interface';
@Controller('cats')
export class CatsController {
constructor(private catsService: CatsService) {}
@Post()
async create(@Body() createCatDto: CreateCatDto) {
this.catsService.create(createCatDto);
}
@Get()
async findAll(): Promise<Cat[]> {
return this.catsService.findAll();
}
}interface IUsers {
readonly user_id?: number
readonly email: string
readonly password: string
readonly active?: boolean
readonly created_at?: any
readonly updated_at?: any
}
class UsersDTO implements IUsers {
readonly user_id?: number
readonly email: string
readonly password: string
readonly active?: boolean
readonly created_at?: any
readonly updated_at?: any
}
Also in JavaScript:
- anime.js morph svg d value
- Root composer.json requires farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master].
- change items loop react
- var = {} js
- hide warnings in expo app
- javascript clearinterval
- javascript name capitalization
- how to delete a cookie in js
- duplicate encoder
- AAPT: error: resource drawable/ic_stat_icone_app_final_2 (aka com.procam.fleeting.br:drawable/ic_stat_icone_app_final_2) not found.
- object values javascript
- how to auto close alert box javascript
- javascript write to text file
- angular vs react
- check if palindrome
- signup form in angular 9
- moving a item fro index to another index, javascript
- node code comment process real time
- Selectores de jQuery
- three dots in javascript
- google analytics nextjs
- javascript stringify line breaks
- if (req.url === "/script.js")
- jquery function