wip nest course

This commit is contained in:
lenovo
2022-11-19 19:31:44 +01:00
parent ffbb3bf442
commit f0af98eb02
33 changed files with 15169 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
export declare class CoffeesController {
findAll(paginationQuery: any): string;
findFlavors(): string;
findOne(id: string): string;
create(body: any): any;
update(id: string, body: any): string;
remove(id: string): string;
}

View File

@@ -0,0 +1,88 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoffeesController = void 0;
const common_1 = require("@nestjs/common");
let CoffeesController = class CoffeesController {
findAll(paginationQuery) {
const { limit, offset } = paginationQuery;
return `this action returns all the coffees.
limit: ${limit},
offset: ${offset}
`;
}
findFlavors() {
return 'this action returns the coffees flavors';
}
findOne(id) {
return `this action returns #${id} coffees`;
}
create(body) {
return body;
}
update(id, body) {
return `this action updates #${id} coffee`;
}
remove(id) {
return `this action removes #${id} coffee`;
}
};
__decorate([
(0, common_1.Get)(),
__param(0, (0, common_1.Query)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "findAll", null);
__decorate([
(0, common_1.Get)('flavors'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "findFlavors", null);
__decorate([
(0, common_1.Get)(':id'),
__param(0, (0, common_1.Param)('id')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "findOne", null);
__decorate([
(0, common_1.Post)(),
(0, common_1.HttpCode)(common_1.HttpStatus.GONE),
__param(0, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "create", null);
__decorate([
(0, common_1.Patch)(':id'),
__param(0, (0, common_1.Param)('id')),
__param(1, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String, Object]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "update", null);
__decorate([
(0, common_1.Delete)(':id'),
__param(0, (0, common_1.Param)('id')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "remove", null);
CoffeesController = __decorate([
(0, common_1.Controller)('coffees')
], CoffeesController);
exports.CoffeesController = CoffeesController;
//# sourceMappingURL=coffees.controller.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"coffees.controller.js","sourceRoot":"","sources":["../../src/coffees/coffees.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AAGjB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG7B,OAAO,CAAU,eAAe;QAC/B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC;QAC1C,OAAO;aACI,KAAK;cACJ,MAAM;GACjB,CAAC;IACH,CAAC;IAGD,WAAW;QACV,OAAO,yCAAyC,CAAC;IAClD,CAAC;IAGD,OAAO,CAAc,EAAU;QAC9B,OAAO,wBAAwB,EAAE,UAAU,CAAC;IAC7C,CAAC;IAID,MAAM,CAAS,IAAI;QAClB,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,MAAM,CAAc,EAAU,EAAU,IAAI;QAC3C,OAAO,wBAAw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