-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hi! Thanks for the awesome library - I much prefer it to the more popular one tbh!
getFirstListItem has typings that makes the first arg ("filter") of type Filter, but the actual method takes in a string and passes it directly to the parent service as the string. This results in an error from pocketbase where the query is incomplete/malformed (400 error).
Edit: forgot to paste reference:
typed-pocketbase/src/client.ts
Lines 231 to 236 in 9285469
| getFirstListItem(filter: string, options?: SendOptions) { | |
| return this.service.getFirstListItem( | |
| filter, | |
| this.prepareOptions(options) | |
| ); | |
| } |
I assume the solution is to:
- Check if it's of type string
- If yes, pass directly
- If no, serialize it and pass it
Happy to open a pull request if that sounds good to you! Thanks again!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels