June 11th, 2023: An update on roles + incoming refactor #3
bitfl0wer
announced in
Blog Posts
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As far as I can tell, role and permission management are now implemented! One can now create, delete and modify roles using Chorus, as well as modifying channel specific permission overrides. Yay progress!
As I implemented this, I couldn't help but notice that most of the functions which perform requests on the API do basically the same thing. It's all input conversion, request forming, request limiter creation, request sending and response/error handling. I feel like we can move a lot of this behaviour into common methods to reduce boilerplate, remove technical debt and make the code easier to maintain in the future. So: this is what I will be doing now. I am also going to experiment with refactoring the methods, so that
RefCell
refs do not get held acrossawait
suspension points. I haven't encountered an issue with the way we are doing it yet, but I feel like it'd be good to do everything properly now to not have a bunch of tech debt slowing us to a halt in the future.That's it for this update! :) Thanks for reading this.
Beta Was this translation helpful? Give feedback.
All reactions