752 questions
4
votes
1
answer
2k
views
Access Denied after interactionFinished using node-oidc-provider
I'm using node-oidc-provider in a custom framework, adonisjs to be specific.
At this point, I can visit http://localhost:3333/auth?client_id=foo&redirect_uri=http://localhost:3333/launch&...
0
votes
1
answer
267
views
How to return a result with duplicate id using whereIn in AdonisJs
I have a list of IDs and I want to query the database.
I press that it returns in order of index the data that appears in the list of Id.
I intend to return a list compatible with the same ID's ...
0
votes
0
answers
166
views
Response doesn't work when using it in a WebSocket callback
when I make a request to my API, my code is using a web socket (Ws https://www.npmjs.com/package/ws) that I have connected to another server (port 7777). The web socket is doing its job correctly, ...
0
votes
0
answers
22
views
In foreach maping ids [duplicate]
I have company product packages.
I need to get current company product packages. Am trying to get than like this
const packageIds = user.company.products.forEach(async (prod) => {
await ...
0
votes
2
answers
1k
views
How do I define object data type in parameter?
My code like this :
public async index(params: any) {
return params
}
return params like this :
{
"data": {
"params": {
"task_id": 101
...
0
votes
0
answers
445
views
How can I convert request file to base64 encoded string in node js?
I using adonis.js
I try code like this :
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
const FileReader = require('file-reader');
export default class MyController {
public ...
0
votes
1
answer
894
views
AdonisJS | Parse Joined ORM Model Before Returning
I'm trying to convert my raw queries into using AdonisJS's built in ORM and QueryBuilder systems, and currently in my raw queries I build objects out of different tables to make for better ...
1
vote
1
answer
477
views
Storing an array of dates (without times)
I'm trying to store dates (without times) in a PostgreSQL array.
For context, let's say these are dates on which a supermarket will be closed:
['2022-12-24', '2022-12-25', '2022-12-26']
The table is ...
0
votes
1
answer
905
views
Web socket.io with AdonisJs not working properly
Web socket.io with AdonisJs not working properly.
I'm using a lib to perform tasks inside adonis, adonis5-scheduler.
Below is my task.
import { BaseTask } from 'adonis5-scheduler/build'
export ...
-2
votes
1
answer
670
views
I have getting error when i'm using message.htmlView to send mail in adonis js
enter image description here
The error:
Error: "@adonisjs/view" must be installed before using "message.htmlView"
I have installed this package but still getting error.
1
vote
1
answer
408
views
How to setup a Adonis js app in CyberPanel
I’m having trouble loading the application. When accessing the subdomain an infinite load is shown and nothing happens.
I tried to use several available tutorials and still without success
SSL work
...
0
votes
1
answer
932
views
Twitter API - How to check if a specific user liked a specific tweet?
I'm using the twitter v2 API for node, I can pull all users who liked a twitter and use an if in a loop, to check if the user I want is inside the array, but depending on if the tweet has many likes ...
1
vote
0
answers
374
views
AdonisJS 5 Dockerfile - Cannot find ace
I have a docker setup with AdonisJS 5. I'm currently trying to get it started (and it builds just fine). But as discussed a bit further down, the ace command cannot be found. ace is the CLI package ...
1
vote
1
answer
605
views
Adonis 5 + Vue "E_ROUTE_NOT_FOUND"
I'm doing an Adonis v5 app with Vue 2 as frontend.
My problem is, once I've build Vue frontend into public adonis folder. If I access to a speficic route writing it into the top browser searcher, I ...
2
votes
1
answer
775
views
How do I rollback adonisjs database before running functional tests with japa?
I set up my bootstrap file to run a few TestUtil commands so that I can migrate and seed my test database before running my full functional test suite. The problem that I'm running in to is when my ...
0
votes
1
answer
150
views
Error when update @adonisjs/ally version 2.1.3 to 4.1.3
After I updated @adonisjs/ally version from 2.1.3 to 4.1.3 and then I got error Cannot find module 'Model. I comment AllyProvider line and run again, It's not error but I can't login both facebook and ...
0
votes
1
answer
401
views
Docker container is using my host DNS instead of the docker internal DNS
I have a docker-compose file that builds two basic application.
A front-end with angular and a backend with adonis.
version: "3.9"
services:
backend_login:
build:
context: ./...
0
votes
1
answer
594
views
Revoke token with jwt not storing in database Adonisjs5
I want to revoke a token with the jwt-token library from adonis, except that I'm using the version where I don't store the token in the database. It asks me at the revoke of the token to pass the ...
3
votes
0
answers
1k
views
how can i use adonis.js with GraphQL?
how can i use adonis with GraphQL?
i had search much more Tutorial but never,so i have to ask for help to you
i had create schema.ts in project like this :
import { makeExecutableSchema } from '...
0
votes
1
answer
207
views
How To Fix: Invalid "database" config. "local" is not defined inside "connections". Make sure to set it inside the "config/database" file Adonis Js
I got an exception from Redis it says:
Invalid "database" config. "local" is not defined inside "connections". Make sure to set it inside the "config/database" ...
1
vote
1
answer
1k
views
How to use mocks in tests with Adonis 5 (adonisjs/fold package)?
I have an API built with Adonis 5 (core version 5.4.0). The tests are made with Adonis' own runner, japa (version 3.1.1).
As per the Adonis documentation, I build my tests to interact with a real test ...
-1
votes
1
answer
1k
views
Is there any way to read file as a File object in nodejs?
I want to get local file as a file object no Buffer, I need File{} object. readSync giving me Buffer.
0
votes
1
answer
1k
views
How to query array from a querybuild in AdonisJs?
I have an object whose column refers to a Json type.
How do I perform a query inside the Json column using id for example?
Model
@column({
prepare: (value: Array<object>) => JSON....
0
votes
1
answer
1k
views
How does one find existence of (Adonis Lucid Many-to-Many) children records on one parent that meet a criteria?
I'm trying to find existence of certain Permissions on a single parent Role (many-to-many).
const roles = await Role
.query()
.preload('permissions')
this.role = roles.find(role => role.id === ...
0
votes
1
answer
685
views
Routing optional parameters in Adonis
My overall goal is to get all jobs associated with a user.
This is my routing code in routes.ts
Route.get('/job/:homeowner_id?', 'JobsController.index')
This is my JobsController.index code inside ...