Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering results not working #160

Open
Danil0v3s opened this issue Jul 9, 2017 · 0 comments
Open

Filtering results not working #160

Danil0v3s opened this issue Jul 9, 2017 · 0 comments

Comments

@Danil0v3s
Copy link

The docs says to do something like:

voos?empresa__equals=AMERICAN%20AIRLINES%20INC

But no matter which prop I search for or whatever I can not get the results to be filtered.

My piece of code
Schema

const voo = new mongoose.Schema(
    {
        "Cod  Empresa" : String,
        "last_updated" : { type: Date, default: Date.now },
        "Empresa" : String,
        "No VOO" : Number,
        "Equip" : String,
        "Seg" : String,
        "Ter" : String,
        "Qua" : String,
        "Qui" : String,
        "Sex" : String,
        "Sab" : String,
        "Dom" : String,
        "Qtde Assentos" : Number,
        "Numero Hotran" : String,
        "Data Solicitacao" : String,
        "Data Aprovacao" : String,
        "Data Vigencia" : String,
        "Natureza Operacao" : String,
        "No Etapa" : Number,
        "COD Origem" : String,
        "ARPT Origem" : String,
        "COD Destino" : String,
        "ARPT Destino" : String,
        "Horario Partida" : String,
        "Horario Chegada " : String,
        "CODESHARE" : String,
        "Observacao" : String,
        "Equip Alt" : String
    }
)

module.exports = restful.model('Voo', voo)

Service

Voo
    .methods(['get'])
    .updateOptions({ new: true, runValidators: true })
    .after('get', errorHandler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant