@noreajs/core
Advanced tools
Comparing version
export { default as Route } from "./route/Route"; | ||
export { NoreaApplication, RouteGroupParamsType, NoreaRouter, AppRoutesInitParamsType, BootstrapInitParamsType, INoreaBootstrap, AfterStartFunctionType, BeforeInitFunctionType, BeforeStartFunctionType, } from "./interfaces"; | ||
export { NoreaApplication, RouteGroupParamsType, NoreaRouter, AppRoutesInitParamsType, BootstrapInitParamsType, INoreaBootstrap, AfterStartFunctionType, BeforeInitFunctionType, BeforeStartFunctionType, UpdateInitConfigParamType, } from "./interfaces"; | ||
export { AppRoutes, NoreaAppRoutes, group } from "./route"; | ||
@@ -7,1 +7,2 @@ export { NoreaApp, NoreaAppInitMethods } from "./NoreaApp"; | ||
export { Notification, EmailNotificationConstructorType, IEmailNotification, IPushNotification, ISmsNotification, NotificationConstructorType, } from "./modules/notifications"; | ||
export { Validator } from "./request/validation/validator"; |
@@ -18,1 +18,3 @@ "use strict"; | ||
exports.ISmsNotification = notifications_1.ISmsNotification; | ||
var validator_1 = require("./request/validation/validator"); | ||
exports.Validator = validator_1.Validator; |
@@ -6,2 +6,2 @@ export { default as NoreaRouter } from "./NoreaRouter"; | ||
export { default as BootstrapInitParamsType } from "./BootstrapInitParamsType"; | ||
export { default as INoreaBootstrap, BeforeInitFunctionType, AfterStartFunctionType, BeforeStartFunctionType, } from "./INoreaBootstrap"; | ||
export { default as INoreaBootstrap, BeforeInitFunctionType, AfterStartFunctionType, BeforeStartFunctionType, UpdateInitConfigParamType, } from "./INoreaBootstrap"; |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const validator_1 = require("../request/validation/validator"); | ||
const AppRoutes_1 = __importDefault(require("../route/AppRoutes")); | ||
@@ -37,7 +38,27 @@ exports.default = new AppRoutes_1.default({ | ||
routes: (r) => { | ||
r.route("/all").get((req, res) => { | ||
res.status(200).send({ | ||
message: "All Projects", | ||
}); | ||
}); | ||
r.route("/all").get([ | ||
validator_1.Validator.validateRequest("query", { | ||
user: { | ||
type: "string", | ||
required: true, | ||
rules: [ | ||
{ | ||
message: "Say my name bitch!", | ||
validator: (value) => { | ||
return value === "LAMBOU"; | ||
}, | ||
}, | ||
], | ||
}, | ||
project: { | ||
type: "bool", | ||
required: false, | ||
}, | ||
}), | ||
(req, res) => { | ||
res.status(200).send({ | ||
message: "All Projects", | ||
}); | ||
}, | ||
]); | ||
}, | ||
@@ -44,0 +65,0 @@ }); |
{ | ||
"name": "@noreajs/core", | ||
"version": "1.1.2-6", | ||
"version": "1.1.2-7", | ||
"description": "Norea.Js is a sets of tools for the development of API with Node.Js.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
93885
20.66%81
2.53%2245
19.8%