I try to have a default value for an Enum, but it just doesn't work somehow. The funny part is when I change period: Period to period:string it works, but I want to receive a Period not a string
@Query(
'period',
new DefaultValuePipe(Period.WEEKLY),
new ParseEnumPipe(Period),
)
period: Period,
): Promise<Object[]> {
init(period)
....
}
Period is defined as:
WEEKLY = 'weekly',
MONTHLY = 'monthly',
QUARTELY = 'quartely',
}```