Fixes and improvements courtesy of Daan (black-puppydog) #6

Merged
glyph merged 13 commits from black_puppydog_fixes into main 2022-10-02 16:43:03 +00:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit 66a5f8b58d - Show all commits

View File

@ -244,6 +244,12 @@ pub fn validate_public_key(public_key: &str) -> Result<(), String> {
}
```
The `utils` module needs to registered in `main.rs`. Without this addition, the module will not be compiled and the `validate_public_key` function will not be available to the rest of our program. Add this line at the top of `src/main.rs`:
```rust
mod utils;
```
Now the validation function can be called from our subscribe / unsubscribe route handlers, allowing us to ensure the provided public key is valid before using it to make further RPC calls to the sbot:
`src/routes.rs`