Skip to content

Admin Settings — date singleton read/write#493

Open
roslyn-maloney wants to merge 2 commits into
devfrom
app-portal/feature/date-singleton
Open

Admin Settings — date singleton read/write#493
roslyn-maloney wants to merge 2 commits into
devfrom
app-portal/feature/date-singleton

Conversation

@roslyn-maloney

Copy link
Copy Markdown
Contributor

Admin Settings — date singleton read/write

🎫 Issue #485.

▶ Changelist:

  • confirmed schema for the singleton data so that it has _id: string, key: SingletonKey, value: unknown, updatedAt: Date, updatedBy: string
  • Implemented getSingleton, setSingleton, and validateDateSingleton
  • Implemented the GET and POST functions for registration-open, registration-closed and confirm-by routes

🧪 Testing:

  • Tested /admin/settings and checked if the dates persisted on save (they did)
  • curl localhost:3000/api/v1/dates/registration-open should return { value: null } initially.
  • curl -X POST localhost:3000/api/v1/dates/registration-open -d '{"value":"2026-02-15T18:00:00Z"}' should return { ok: true, value: "2026-02-15T18:00:00.000Z" }.
  • curl localhost:3000/api/v1/dates/registration-open should now return { value: "2026-02-15T18:00:00.000Z" }.
  • curl -X POST localhost:3000/api/v1/dates/registration-open -d '{"value":"not a date"}' should return 400 with an error.
  • Did it for registration-closed and confirm-by endpoints

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
core-live Ready Ready Preview, Comment Jul 2, 2026 11:38pm
core-main Ready Ready Preview, Comment Jul 2, 2026 11:38pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant