usememos / memos

An open source, lightweight note-taking service. Easily capture and share your great thoughts.
https://usememos.com
MIT License
30.31k stars 2.27k forks source link

Enquire about filter params in list memos api #3411

Closed JakeLaoyu closed 4 months ago

JakeLaoyu commented 4 months ago

Describe the bug

Consult how to use the filter parameter when passing it into the fetch function. I cannot access no matter what format I use.

image image

Steps to reproduce

curl --location 'http://127.0.0.1:5230/api/v1/memos?filter=creator%3D%3Dusers%2F1%20%26%26%20visibilities%3D%3D%5B%27PUBLIC%27%2C%20%27PROTECTED%27%5D' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJuYW1lIjoiIiwiaXNzIjoibWVtb3MiLCJzdWIiOiIxIiwiYXVkIjpbInVzZXIuYWNjZXNzLXRva2VuIl0sImV4cCI6MTcxNjc3OTgzMiwiaWF0IjoxNzE2MTc1MDMyfQ.kEEep1DpFH1Cj3jq5YR-8NGI7EEUlU9AmGTj17lJY_k'

The version of Memos you're using

0.22.0

Screenshots or additional context

No response

boojack commented 4 months ago

Good catch. There should be a single quote around creator. And the documentation has been updated.

e.g., encodeURIComponent("include_comments==true&&creator=='users/1'")

JakeLaoyu commented 4 months ago

@boojack thx