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

irrasoft-node-codegen

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

irrasoft-node-codegen - npm Package Compare versions

Comparing version 0.0.103 to 0.0.104

2

package.json
{
"name": "irrasoft-node-codegen",
"version": "0.0.103",
"version": "0.0.104",
"bin": {

@@ -5,0 +5,0 @@ "codegen": "./bin/cli.js"

@@ -12,3 +12,4 @@ import Router from 'koa-router';

router.get('/', async(ctx) => { // get all
const result = await model.getAll();
const { limit, offset } = ctx.query
const result = await model.getAll(limit, offset);
if(result) {

@@ -44,7 +45,8 @@ ctx.body = {

router.post('/', async(ctx) => { // create
const isCreated = await model.create(ctx.payload);
const data = await model.create(ctx.payload);
if(isCreated) {
if(data) {
ctx.response.body = {
status: 'success',
data: isCreated
};

@@ -54,3 +56,3 @@ }else {

status: 'error',
message: msgConfig.message.error.internalError
message: msgConfig.message.error.invalidPayload
};

@@ -60,8 +62,9 @@ }

router.put('/', async(ctx) => { // update
const isUpdated = await model.update(ctx.payload);
router.put('/:id', async(ctx) => { // update
const data = await model.update(ctx.params.id, ctx.payload);
if(isUpdated) {
if(data) {
ctx.response.body = {
status: 'success',
data: data
};

@@ -68,0 +71,0 @@ }else {

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