Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@mqict/adonis-controller
Advanced tools
MQ-Controller is a set of base Controller for MQ's Team server. MQ-Controller runs on **Adonisjs 4**,
MQ-Controller is a set of base Controller for MQ's Team server. MQ-Controller runs on Adonisjs 4,
npm install @mqict/adonis-controller
in Controller file: use use('@mqict/adonis-controller') as BaseController.
const Controller = use('@mqict/adonis-controller')
class ApiController extends Controller {
.....
}
in start/routes.js:
const Route = use('Route')
const { ioc } = use('@adonisjs/fold') //<---- add
const pluralize = use('pluralize') //<---- add
....
Route.post('/:controller/getdata', ({view ,request, response,params}) => {
const controller = pluralize.singular(params.controller)
const url = `App/Controllers/Http/Api/${controller}Controller.getData`
const controllerInstance = ioc.makeFunc(url)
return controllerInstance.method.apply(controllerInstance.instance,[{view,request,response}])
})
Route.post('/:controller/getschema', ({view ,request, response,params}) => {
const controller = pluralize.singular(params.controller)
const url = `App/Controllers/Http/Api/${controller}Controller.getSchema`
const controllerInstance = ioc.makeFunc(url)
return controllerInstance.method.apply(controllerInstance.instance,[{view,request,response}])
})
{{host}}/api/students/getdata (POST method)
BODY:
{
"fields": {
"firstname": 1,
"lastname": 1,
"basicClass": {
"_id": 1,
"name": 1,
"students": {
"_id": 1,
"firstname": 1,
"lastname": 1,
"$limit": 1
},
"occupation": {
"_id": 1,
"name": 1,
"institute": {
"_id": 1,
"name": 1
}
}
}
},
"conditions": {
"firstname": "đức"
},
"page": 0,
"pageSize": 20,
"sorted": [
{"id": "firstname", "desc": true}
]
}
output:
{
"total": 2,
"perPage": 20,
"lastPage": 1,
"page": 1,
"data": [
{
"_id": "5b8f2e822d904647341c5838",
"firstname": "Đỗ Đức",
"lastname": "Thu",
"basicClass": {
"_id": "5b8e61a0269e861e1c150b86",
"name": "co so nghanh 2 k9",
"students": [
{
"_id": "5b8e4f172d904647341c582a",
"firstname": "Đinh Đức",
"lastname": "Thuận"
}
],
"occupation": {
"_id": "5b7675b712e8540b92191b68",
"name": "Nghề thiết kế đồ họa",
"institute": {
"_id": "5b767592a8cc5c0b8a643623",
"name": "Khoa Công Nghệ Thông Tin"
}
}
}
},
{
"_id": "5b8e4f172d904647341c582a",
"firstname": "Đinh Đức",
"lastname": "Thuận",
"basicClass": {
"_id": "5b8e47650ae80929d4da6ffc",
"name": "Cơ sở nghành K9",
"students": [
{
"_id": "5b8e4f172d904647341c5823",
"firstname": "Nguyễn Chí",
"lastname": "Tài"
}
],
"occupation": {
"institute": {}
}
}
}
]
}
###get schema:
{{host}}/api/students/getschema (GET method)
output
{
"_id": "objectid",
"code": "string",
"firstname": "string",
"lastname": "string",
"birthday": "string",
"identified_number": "string",
"gender": "string",
"place_of_birth": "string",
"hometown": "string",
"address": "string",
"phone": "string",
"area": "string",
"ethnic": "string",
"relationships": "array",
"courseId": "objectid",
"status": "number",
"created_at": "moment",
"updated_at": "moment",
"basicClassId": "objectid",
"specifiedClassId": "object",
"fees": "array",
"course": "function",
"basicClass": "function",
"specifiedClass": "function"
}
NgocHip
FAQs
MQ-Controller is a set of base Controller for MQ's Team server. MQ-Controller runs on **Adonisjs 4**,
The npm package @mqict/adonis-controller receives a total of 1 weekly downloads. As such, @mqict/adonis-controller popularity was classified as not popular.
We found that @mqict/adonis-controller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.