@epip/crud
Advanced tools
Comparing version
import { applyDecorators, Delete, Get, Patch, Post, Put, Type } from "@nestjs/common"; | ||
import { ApiOkResponse, getSchemaPath } from "@nestjs/swagger"; | ||
import { ApiOkResponse, ApiParam, getSchemaPath } from "@nestjs/swagger"; | ||
import { IResponse } from "../types/res.interface"; | ||
@@ -58,3 +58,7 @@ | ||
return applyDecorators( | ||
Put(path || "/"), | ||
Put(path || "/:id"), | ||
ApiParam({ | ||
name: 'id', | ||
type: 'number' | ||
}), | ||
ApiOkResponse({ | ||
@@ -61,0 +65,0 @@ type: model, |
@@ -38,3 +38,6 @@ "use strict"; | ||
var ApiPut = function (model, path) { | ||
return (0, common_1.applyDecorators)((0, common_1.Put)(path || "/"), (0, swagger_1.ApiOkResponse)({ | ||
return (0, common_1.applyDecorators)((0, common_1.Put)(path || "/:id"), (0, swagger_1.ApiParam)({ | ||
name: 'id', | ||
type: 'number' | ||
}), (0, swagger_1.ApiOkResponse)({ | ||
type: model, | ||
@@ -41,0 +44,0 @@ })); |
{ | ||
"name": "@epip/crud", | ||
"version": "1.0.40", | ||
"version": "1.0.41", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
255412
70.87%53
1.92%838
0.84%