A modern platform tailored for hosting providers and enthusiasts to effortlessly interact with their servers. Seamlessly wrapping around Proxmox, Convoy is easily deployable, affordable at just $6 per node per month for commercial use, and completely free for personal and non-profit endeavors.
[X] I have searched the existing issues before opening this feature request.
Describe the feature you would like to see.
In the admin area for servers, administrators can give a server unlimited bandwidth by omitting any value (essentially null) from the bandwidth allocation field. This is a little tricky to implement internally as null is a very ambiguous value-can indicate that the request simply does not want to modify the bandwidth field.
It can also be extremely confusing if it is an optional field in an API request as null can mean if its optional or if its marked as unlimited, and this is virtually impossible to differentiate as a type in Typescript. For example, determine whether the type below indicates whether the admin wants the field to stay untouched or mark it as unlimited. (Don't say just use undefined because you should refrain from using undefined as much as possible).
type BandwidthAllocationParam = number | null | undefined
Describe the solution you'd like.
Instead of using null as an indicator for no limitation on a resource, it should be switched to -1 as it's a defined value and clearly indicates that a field is unlimited (because you cannot allocate negative resources).
Is there an existing feature request for this?
Describe the feature you would like to see.
In the admin area for servers, administrators can give a server unlimited bandwidth by omitting any value (essentially
null
) from the bandwidth allocation field. This is a little tricky to implement internally asnull
is a very ambiguous value-can indicate that the request simply does not want to modify the bandwidth field.It can also be extremely confusing if it is an optional field in an API request as
null
can mean if its optional or if its marked as unlimited, and this is virtually impossible to differentiate as a type in Typescript. For example, determine whether the type below indicates whether the admin wants the field to stay untouched or mark it as unlimited. (Don't say just useundefined
because you should refrain from usingundefined
as much as possible).Describe the solution you'd like.
Instead of using
null
as an indicator for no limitation on a resource, it should be switched to-1
as it's a defined value and clearly indicates that a field is unlimited (because you cannot allocate negative resources).Additional context to this request.
No response