add endDate and deadline middleware filter