This commit is contained in:
Timothy Jaeryang Baek 2025-12-28 23:23:56 +04:00
parent c79fb7db74
commit eb4b085b86

View file

@ -244,9 +244,14 @@ class NoteTable:
return [NoteModel.model_validate(note) for note in notes]
def search_notes(
self, user_id: str, filter: dict = {}, skip: int = 0, limit: int = 30
self,
user_id: str,
filter: dict = {},
skip: int = 0,
limit: int = 30,
db: Optional[Session] = None,
) -> NoteListResponse:
with get_db() as db:
with get_db_context(db) as db:
query = db.query(Note, User).outerjoin(User, User.id == Note.user_id)
if filter:
query_key = filter.get("query")