
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
adonis-mqcontroller
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 adonis-mqcontroller
in Controller file: use use('adonis-mqcontroller') as BaseController.
const Controller = use('adonis-mqcontroller')
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 adonis-mqcontroller receives a total of 2 weekly downloads. As such, adonis-mqcontroller popularity was classified as not popular.
We found that adonis-mqcontroller 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.