
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
@fickou/adonis-controller-helpers
Advanced tools
Add helper on Controller for Adonis JS 5+
Run:
npm i --save @fickou/adonis-controller-helpers
Install provider:
node ace configure @fickou/adonis-controller-helpers
In a controller
import {HttpContextContract} from "@ioc:Adonis/Core/HttpContext";
import IndexService from 'App/Services/users/Index'
import Database from "@ioc:Adonis/Lucid/Database";
export default UserController{
public index({ request, response }: HttpContextContract){
let data = await request.checkInputs();
await Database.transaction(async (trx) => {
const executor = new Index(trx);
return response.apiView(await executor.execute(data));
});
}
}
In a service:
import Parameter from 'App/Models/settings/Parameter';
import ControllerHelper, from "@ioc:Adonis/Addons/ControllerHelper";
import {Service} from "@fickou/adonis-controller-helpers";
export default class Index extends Service {
async execute(payload) {
const query = Parameter.query({client: this.trx});
return ControllerHelper.searchPayload(query, payload);
}
}
// or
export default class Index extends Service {
async execute(payload) {
const query = ControllerHelper.buildQuery((this.trx || Database), (db) => db.query()
.from('parameters')
.select(['*']);
return ControllerHelper.searchDatabasePayload(query, payload);
}
}
FAQs
Help dev to filter database with query parameters
We found that @fickou/adonis-controller-helpers demonstrated a healthy version release cadence and project activity because the last version was released less than 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 adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.