Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(rule set): make resource document allow adding post ID rules
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Sep 11, 2022
1 parent 32fe5a7 commit dd265dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/rule_sets/make_resource_document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ export default function(
isNew = false,
mustCastID = false,
postAttributeValidation = { "pipes": [] } as Rules,
postIDRules = { "pipes": [] } as Rules,
extraDataQueries = {} as FieldRules,
extraQueries = {} as FieldRules
}: Partial<{
isNew: boolean
mustCastID: boolean
postAttributeValidation: Rules,
postIDRules: Rules,
extraDataQueries: FieldRules
extraQueries: FieldRules
}> = {}
Expand All @@ -28,7 +30,8 @@ export default function(
? {}
: makeIDRules({
"IDName": "id",
"mustCast": mustCastID
"mustCast": mustCastID,
"postRules": postIDRules
}),
...makeTypeRules(typeName),
"attributes": {
Expand Down

0 comments on commit dd265dc

Please sign in to comment.