Class

Resource

(private) Resource(MongooseModel)

Adapter for mongoose resource

Constructor

# private new Resource(MongooseModel)

Parameters:
Name Type Description
MongooseModel MongooseModel

Class which subclass mongoose.Model

View Source adminjs-mongoose/src/resource.ts, line 15

Classes

Resource
Resource

Methods

# parseParams(params) → {Object}

Check all params against values they hold. In case of wrong value it corrects it.

What it does exactly:

  • removes keys with empty strings for the number, float and 'reference' properties.
Parameters:
Name Type Description
params Object

received from AdminJS form

View Source adminjs-sequelizejs/src/resource.ts, line 171

converted params

Object

# prepareParams()

Converts params from string to final type

View Source adminjs-typeorm/src/Resource.ts, line 122