Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PI-2851 Update default date to previous day #22

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function routes({ auditService, hmppsAuthClient }: Services): Rou
const filters: Filters = {
date: req.query.date
? LocalDate.parse(req.query.date as string, DateTimeFormatter.ofPattern('d/M/yyyy'))
: LocalDate.now(),
: LocalDate.now().minusDays(1),
keywords: req.query.keywords as string,
status: asArray(req.query.status),
template: asArray(req.query.template),
Expand Down
24 changes: 12 additions & 12 deletions wiremock/mappings/notifications-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
},
"notifications": [
{
"body": "Reminder: Dear Test. This is an automated reminder of your UPW appointment on {{ now offset='+2 days' format='dd/MM/yyyy' }}. Please bring lunch and wear appropriate clothing.",
"completed_at": "{{ now }}",
"body": "Reminder: Dear Test. This is an automated reminder of your UPW appointment on {{ now offset='+1 days' format='dd/MM/yyyy' }}. Please bring lunch and wear appropriate clothing.",
"completed_at": "{{ now offset='-1 days' }}",
"cost_details": {
"billable_sms_fragments": 1,
"international_rate_multiplier": 1.0,
"sms_rate": 0.0227
},
"cost_in_pounds": 0.0227,
"created_at": "{{ now }}",
"created_at": "{{ now offset='-1 days' }}",
"id": "00000000-0000-0000-0000-000000000001",
"phone_number": "07700900000",
"reference": "A000001",
"sent_at": "{{ now }}",
"sent_at": "{{ now offset='-1 days' }}",
"status": "delivered",
"subject": null,
"template": {
Expand All @@ -36,19 +36,19 @@
"type": "sms"
},
{
"body": "Reminder: Dear Test2. This is an automated reminder of your UPW appointment on {{ now offset='+2 days' format='dd/MM/yyyy' }}. Please bring lunch and wear appropriate clothing.",
"completed_at": "{{ now }}",
"body": "Reminder: Dear Test2. This is an automated reminder of your UPW appointment on {{ now offset='+1 days' format='dd/MM/yyyy' }}. Please bring lunch and wear appropriate clothing.",
"completed_at": "{{ now offset='-1 days' }}",
"cost_details": {
"billable_sms_fragments": 1,
"international_rate_multiplier": 1.0,
"sms_rate": 0.0227
},
"cost_in_pounds": 0.0227,
"created_at": "{{ now }}",
"created_at": "{{ now offset='-1 days' }}",
"id": "00000000-0000-0000-0000-000000000002",
"phone_number": "07700900111",
"reference": "A000002",
"sent_at": "{{ now }}",
"sent_at": "{{ now offset='-1 days' }}",
"status": "sending",
"subject": null,
"template": {
Expand All @@ -74,19 +74,19 @@
"response": {
"status": 200,
"jsonBody": {
"body": "Reminder: Dear Test. This is an automated reminder of your UPW appointment on {{ now offset='+2 days' format='dd/MM/yyyy' }}. Please bring lunch and wear appropriate clothing.",
"completed_at": "{{ now }}",
"body": "Reminder: Dear Test. This is an automated reminder of your UPW appointment on {{ now offset='+1 days' format='dd/MM/yyyy' }}. Please bring lunch and wear appropriate clothing.",
"completed_at": "{{ now offset='-1 days' }}",
"cost_details": {
"billable_sms_fragments": 1,
"international_rate_multiplier": 1.0,
"sms_rate": 0.0227
},
"cost_in_pounds": 0.0227,
"created_at": "{{ now }}",
"created_at": "{{ now offset='-1 days' }}",
"id": "00000000-0000-0000-0000-000000000001",
"phone_number": "07700900000",
"reference": "A000001",
"sent_at": "{{ now }}",
"sent_at": "{{ now offset='-1 days' }}",
"status": "delivered",
"subject": null,
"template": {
Expand Down
Loading