Client code sends "empty" ints as values #204

Open
opened 2022-05-29 21:12:37 +02:00 by Jef Roosens · 0 comments
Owner

Because V automatically initalizes an int as 0 if not specified, the value is always passed to the API. This causes the client code to send requests like this:

GET /api/logs?limit=25&offset=0&repo=0&before=0&after=0

The only zero value we actually want to send is offset=0. Luckily, this isn't a big issue because the server API treats a zero value as being not specified for most queries. Still, I'd like to prevent these unnecessary query parameters if possible.

Because V automatically initalizes an int as 0 if not specified, the value is always passed to the API. This causes the client code to send requests like this: ``` GET /api/logs?limit=25&offset=0&repo=0&before=0&after=0 ``` The only zero value we actually want to send is `offset=0`. Luckily, this isn't a big issue because the server API treats a zero value as being not specified for most queries. Still, I'd like to prevent these unnecessary query parameters if possible.
Jef Roosens added the
bug
label 2022-05-29 21:12:37 +02:00
This repository is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: vieter-v/vieter#204
No description provided.