-
-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should the user object in GetSiteResponse use ListingType/SortType enums? #1136
Comments
For now at least, consider these as numbered enums (This comes from them being the only sorting type stored in the DB, and I think I arbitrarily chose Eventually it'd probably be a good idea to have these ones be strings as well, so it would require changing both the API and that column to a varchar type. |
okay, thanks! i'll see if i can write a serializer for it that can accept both |
I would just let the serializer treat it like a number enum, and then the clients can use the index / ordinal of the value:
In the future we can convert it to a string-valued enum anyway. |
This could be done using: https://github.com/adwhit/diesel-derive-enum . The only other enum that's in use, is |
- Uses diesel-derive-enum. - Adds diesel.toml , so we can again use the auto-generated schema.rs - Fixes a lot of DB null issues and column ordering issues. - Fixes #1136 - Also replaces RegistrationMode boilerplate.
* Adding diesel enums for SortType and ListingType - Uses diesel-derive-enum. - Adds diesel.toml , so we can again use the auto-generated schema.rs - Fixes a lot of DB null issues and column ordering issues. - Fixes #1136 - Also replaces RegistrationMode boilerplate. * Fixing unit tests 1. * Remove comment line. * Before patch. * Before again. * Using patch file to fix diesel_ltree issue with diesel.toml * Adding some yalc ignores * Fixing RegistrationMode enums * Adding woodpecker diesel schema check. * Try adding openssl 1. * Try using diesel-cli image 1 * Try using diesel-cli image 2 * Try using diesel-cli image 3 * Try using diesel-cli image 4 * Try using diesel-cli image 5 * Try using diesel-cli image 6 * Try using diesel-cli image 7 * Try using diesel-cli image 8 * Try using diesel-cli image 9 * Try using diesel-cli image 10 * Try using diesel-cli image 11 * Try using diesel-cli image 12 * Try using diesel-cli image 13
default_sort_type and default_listing_type both currently return numbers, should or will these be returning the same enum values used in other endpoints?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: