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

@vori/nest-schematics

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vori/nest-schematics - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

10

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

@@ -33,3 +33,3 @@ <% if (crud && type === 'rest') { %>import { Get, Post, Body, Patch, Param, Delete, Req } from '@nestjs/common';

): Promise<<%= singular(classify(name)) %>Dto> {
const <%= singular(camelize(name)) %> = await this.<%= lowercased(name) %>Service.create(request.user, create<%= singular(classify(name)) %>Dto);
const <%= singular(camelize(name)) %> = await this.<%= lowercased(name) %>Service.create({bannerID: request.user.bannerID, dto: create<%= singular(classify(name)) %>Dto});
return new <%= singular(classify(name)) %>Dto(<%= singular(camelize(name)) %>);

@@ -42,3 +42,3 @@ }

public async findAll(@Req() request: RequestWithBannerUser): Promise<<%= singular(classify(name)) %>Dto[]> {
const <%= camelize(name) %> = await this.<%= lowercased(name) %>Service.findAll(request.user);
const <%= camelize(name) %> = await this.<%= lowercased(name) %>Service.findAll({bannerID: request.user.bannerID});
return <%= camelize(name) %>.map(<%= singular(camelize(name)) %> => new <%= singular(classify(name)) %>Dto(<%= singular(camelize(name)) %>));

@@ -52,3 +52,3 @@ }

public async findOne(@Req() request: RequestWithBannerUser, @Param() params: FindOneParams) {
const <%= singular(camelize(name)) %> = await this.<%= lowercased(name) %>Service.findOne(request.user, params.id);
const <%= singular(camelize(name)) %> = await this.<%= lowercased(name) %>Service.findOne({bannerID: request.user.bannerID, id: params.id});
return new <%= singular(classify(name)) %>Dto(<%= singular(camelize(name)) %>);

@@ -63,3 +63,3 @@ }

public async update(@Req() request: RequestWithBannerUser, @Param() params: FindOneParams, @Body() update<%= singular(classify(name)) %>Dto: Update<%= singular(classify(name)) %>Dto) {
const <%= singular(camelize(name)) %> = await this.<%= lowercased(name) %>Service.update(request.user, params.id, update<%= singular(classify(name)) %>Dto);
const <%= singular(camelize(name)) %> = await this.<%= lowercased(name) %>Service.update({bannerID: request.user.bannerID, id: params.id, dto: update<%= singular(classify(name)) %>Dto});
return new <%= singular(classify(name)) %>Dto(<%= singular(camelize(name)) %>);

@@ -73,3 +73,3 @@ }

public async remove(@Req() request: RequestWithBannerUser, @Param() params: FindOneParams): Promise<void> {
await this.<%= lowercased(name) %>Service.remove(request.user, params.id);
await this.<%= lowercased(name) %>Service.remove({bannerID: request.user.bannerID, id: params.id});
}<% } else if (type === 'microservice' && crud) { %>

@@ -76,0 +76,0 @@

@@ -6,2 +6,4 @@ import { faker } from '@faker-js/faker';

import { makeDatabaseID } from '@vori/utils/VoriRandom';
import { make<%= singular(classify(name)) %> } from '../fakers/<%= singular(name) %>.faker';

@@ -18,3 +20,3 @@ import { <%= singular(classify(name)) %>Dto } from './<%= singular(name) %>.dto';

const <%= singular(camelize(name)) %> = make<%= singular(classify(name)) %>({
id: faker.datatype.number({ min: 1 }).toString(),
id: makeDatabaseID(),
});

@@ -21,0 +23,0 @@ const dto = instanceToPlain(new <%= singular(classify(name)) %>Dto(<%= singular(camelize(name)) %>));

@@ -7,3 +7,3 @@ {

},
"version": "1.1.0",
"version": "1.1.1",
"description": "Nest - modern, fast, powerful node.js web framework (@schematics)",

@@ -10,0 +10,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