Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nampham0494/nest-crud-generate

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nampham0494/nest-crud-generate - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

24

dist/lib/crud-resource/files/ts/__name__.controller.ts

@@ -41,4 +41,7 @@ <% if (crud && type === 'rest') { %>import {

@UseGuards(AuthGuard('jwt'), RoleGuard)
async create(@Body() create<%= singular(classify(name)) %>Dto: Create<%= singular(classify(name)) %>Dto): Promise<<%= singular(classify(name)) %>Entity> {
const created = await this.<%= lowercased(name) %>Service.create(create<%= singular(classify(name)) %>Dto);
async create(
@Body() create<%= singular(classify(name)) %>Dto: Create<%= singular(classify(name)) %>Dto,
@Query('crudQuery') crudQuery: string,
): Promise<<%= singular(classify(name)) %>Entity> {
const created = await this.<%= lowercased(name) %>Service.create(create<%= singular(classify(name)) %>Dto, { crudQuery });
return created;

@@ -50,4 +53,7 @@ }

@UseGuards(AuthGuard('jwt'), RoleGuard)
async findOne(@Param('id') id: string): Promise<<%= singular(classify(name)) %>Entity> {
const match = await this.<%= lowercased(name) %>Service.findOne(id);
async findOne(
@Param('id') id: string,
@Query('crudQuery') crudQuery: string,
): Promise<<%= singular(classify(name)) %>Entity> {
const match = await this.<%= lowercased(name) %>Service.findOne(id, { crudQuery });
return match;

@@ -62,4 +68,5 @@ }

@Body() update<%= singular(classify(name)) %>Dto: Update<%= singular(classify(name)) %>Dto,
@Query('crudQuery') crudQuery: string,
): Promise<<%= singular(classify(name)) %>Entity> {
const updated = await this.<%= lowercased(name) %>Service.update(id, update<%= singular(classify(name)) %>Dto);
const updated = await this.<%= lowercased(name) %>Service.update(id, update<%= singular(classify(name)) %>Dto, { crudQuery });
return updated;

@@ -71,5 +78,8 @@ }

@UseGuards(AuthGuard('jwt'), RoleGuard)
async remove(@Param('id') id: string): Promise<<%= singular(classify(name)) %>Entity> {
return this.<%= lowercased(name) %>Service.remove(id);
async remove(
@Param('id') id: string,
@Query('crudQuery') crudQuery: string,
): Promise<<%= singular(classify(name)) %>Entity> {
return this.<%= lowercased(name) %>Service.remove(id, { crudQuery });
}<% } %>
}
{
"name": "@nampham0494/nest-crud-generate",
"version": "1.0.7",
"version": "1.0.8",
"description": "Nest",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc