Skip to content

Refactor InMemoryScreenshotRepository methods - #78

Open
mspandey wants to merge 1 commit into
madhav2348:mainfrom
mspandey:patch-8
Open

Refactor InMemoryScreenshotRepository methods#78
mspandey wants to merge 1 commit into
madhav2348:mainfrom
mspandey:patch-8

Conversation

@mspandey

Copy link
Copy Markdown

Summary

Implement repository lookup by source reference in the in-memory repository.

Changes Made

  • Added lookup logic to findBySourceRef() instead of always returning null.
  • Enabled retrieval of stored screenshot records using their source reference.

Why This Change?

The repository interface exposes a findBySourceRef() method, but the current in-memory implementation returns null for every request regardless of stored data. This prevents consumers from locating existing records by source reference.

Implementing the lookup ensures the in-memory repository behaves consistently with the repository contract.

Impact

  • Improves repository correctness.
  • Enables source-reference-based record retrieval.
  • Keeps in-memory behavior aligned with expected repository functionality.

Removed unused findByHash method and refactored findBySourceRef method.
@github-actions

Copy link
Copy Markdown

🎉 Thanks for submitting a PR, @mspandey!

Please confirm the following checklist before review:

  • ⭐ I have starred this repository
  • 🍴 I have forked this repository
  • 📖 I have read the Contributing Guidelines
  • 🔀 My changes are pushed to the develop branch

A maintainer will review your PR shortly. Thank you! 🚀

@madhav2348 madhav2348 added the invalid This doesn't seem right label Jun 19, 2026
@madhav2348

Copy link
Copy Markdown
Owner

ESOC or SSOC ? and please read contribution guidlines

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

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants