Skip to content

Add DateModified to domain models + delta API endpoints #121

@fboucher

Description

@fboucher

Parent PRD

#110

Depends on

Nothing — fully server-side, can be worked in parallel.

Summary

Add DateModified (UTC timestamp) to the Post and Note domain models and their Azure Table Storage representations. Extend existing API endpoints to support a modifiedAfter query parameter for delta sync.

Domain changes

  • Add DateModified (DateTime UTC) to Post (in NoteBookmark.Domain/Post.cs)
  • Add DateModified (DateTime UTC) to Note (in NoteBookmark.Domain/Note.cs)
  • Set DateModified automatically on every create and update operation

API changes

  • GET /api/posts?modifiedAfter={ISO8601} — returns only posts modified after the given timestamp; returns all posts if param omitted (non-breaking)
  • GET /api/notes?modifiedAfter={ISO8601} — same for notes
  • PATCH /api/posts/{id} and PATCH /api/notes/{id} correctly update DateModified

Tests

  • GET /posts?modifiedAfter={ts} returns only records modified after ts
  • GET /notes?modifiedAfter={ts} same
  • Both endpoints return all records when param omitted
  • Empty-result and multi-result cases covered
  • Use existing WebApplicationFactory + NoteBookmarkApiTestFactory pattern

Acceptance Criteria

  • DateModified field on Post and Note
  • All create/update paths set DateModified = DateTime.UtcNow
  • modifiedAfter param on both list endpoints (non-breaking — omitting returns all)
  • API integration tests pass

Sync stories from PRD

User stories 7, 8, 19

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    In progress

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions