This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tokenFieldsWeights = { | |
id: 100, | |
dependency_id: 80, | |
task_id: 80, | |
actor_id: 60, | |
actor_owner_id: 40, | |
actor_owner_type: 30 | |
actor_type: 20 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TransactionsResource extends Restypie.Resources.SequelizeResource { | |
get schema() { | |
return { | |
id: { type: String, isPrimaryKey: true, isFilterable: true }, | |
tasks: { | |
type: Restypie.Fields.ToManyField, | |
to() { return api.resources.tasks; }, | |
toKey: 'transaction_id', | |
isFilterable: true, | |
filteringStrategy: FilteringStrategies.BottomToTop // Will first filter tasks to get transaction ids and apply those to the filters |