Questions tagged [feathers-service]

26 questions
3
votes
1 answer

How to work with many to few mongodb relationship with feathersjs?

I have two models, with a many-to-few relationship, that I'm modelling as follows: // Portfolio const portfoliosSchema = new Schema({ name: { type: String, required: true }, description: { type: String }, user: { type: Schema.Types.ObjectId,…
cnorris
  • 548
  • 4
  • 12
1
vote
1 answer

Feathers authentication.create throws 401 not authenticated error

// code app.use('/login', { async create(data, params) { data.strategy = 'local'; return authentication.create(data, params); } }); // config "local": { "usernameField": "username", "passwordField": "password" } I am using…
1
vote
1 answer

FeathersJs - Sanitize response from Find method in users service broke Authentication service

I created an after hook in the users service that should sanitize the response from the "find" method and it broke the authentication service. The after hook sanitizeResponse should verify if the query is regarding the email or cpf, and, if it is,…
1
vote
4 answers

How to Custom Error Object of Feathersjs?

Let say if I throw GeneralError when call a service, how to make error object like what I want: { "status": "Failed", "code": "500_1", "detail": "Something is wrong with your API" } I already try add this on error hook hook => { hook.error =…
1
vote
1 answer

Feathers: Customizing find() for two different queries

I'm using FeathersJS and ReactJs to build an application and now I am stuck in a certain point. The user interface I'm working on is a table and I have a navigation bar to control the data exhibited, like in the image. In the select users may…
1
vote
1 answer

feathers.js - saving one record to multiple databases - mysql and elastic search

I have built an app with Feathers.js and I'm trying to find the way, how can I save any record to the multiple databases? I would like to save a "message" for example to the mysql and also to the elastic search. I would like to use elastic search…
1
vote
1 answer

When creating a feathers service with nedb, is it possible to define a unique index?

I made a feathers service using nedb with feathers generate service Let's say the service is called warehouses and I want to have a unique index on the name. The Nedb docs tell me I can create a unique index with db.ensureIndex, but I cannot seem to…
1
vote
1 answer

Non CRUD Route in FeathersJS

I have a service results that handles all CRUD Operations for the results service in feathersjs. How would I create a route /results/:id/hr_bar_graph which basically fetches the result at that particular id and uses the resulting data to create an…
1
vote
1 answer

How to override feathersjs defaults service methods

I have a feathersjs service created using the feathers generate service command. I want to override its definition of create method. This is my service class /* eslint-disable no-unused-vars */ // Initializes the `userGroup` service on path…
1
vote
0 answers

Feathersjs -> service find with dynamic filters and column selection

So this isn't really a question, more a post on how I solved this specific situation: Desired Situation I wanted to be able to select data from a feathersjs find service call. However, I didn't want to have all columns returned, but different ones…
1
vote
1 answer

How does feathers sequelize work

I'm using angular2 on frontend, node/feathers on backend over Postgres (sequelize) db. On backend I have events service on ".../events" route, and I'm trying to reach data from db, it works fine when I want to retrieve all events so I just make…
0
votes
2 answers

Sign-up procedure design using Feathersjs

I have a question regarding the design of the sign-up procedure using FeatherJS for the back-end of my application. The problem I'm facing is the following: I want a user to be able to sign-up his organisation/company using his/her email and a…
0
votes
1 answer

Feathers JS MongoDB Service: Dynamic Collection Names

Goal I'm attempting to build a multi-tenant application with Feathers JS. On login, the tenant ID will be included in the request. From then on, the tenant ID will be gotten from the user field with the request parameters. Every user has this…
foxtrotuniform6969
  • 3,527
  • 7
  • 28
  • 54
0
votes
1 answer

Feathersjs :my hook is failing(loosing context) once i chained it with an other in before function

I have 2 functions(authenticate, restrictAccess) in the before hook (get) and i want to chain them together.But the restrictAccess is being executed twice(by the second round it has lost the context) When i remove the authenticate , the…
0
votes
2 answers

Transaction in feathersjs using Objection ORM

feathers-objection - A service adapter for Objection.js - A minimal SQL ORM built on top of Knex. Transactions are atomic and isolated units of work in relational databases. We want to create and use transaction in feathersjs application generated…
1
2