diff --git a/src/game/gameperson.decorator.ts b/src/game/gameperson.decorator.ts new file mode 100644 index 0000000000000000000000000000000000000000..26c119ae5edf7771e79fad206b39baaa018ab284 --- /dev/null +++ b/src/game/gameperson.decorator.ts @@ -0,0 +1,13 @@ +import { createParamDecorator } from '@nestjs/common'; + +/* + gives service access to the gameperson object + Game_PersonEntity { + gamepersonId + role + faction + } +*/ +export const GamePerson = createParamDecorator((data, req) => { + return data ? req.gameperson[data] : req.gameperson; +});