Refactor the database interactions out of the commands

This commit is contained in:
2023-03-20 00:00:18 +01:00
parent 1170fa8c87
commit 2e7ca98a89
3 changed files with 101 additions and 62 deletions

View File

@@ -20,6 +20,7 @@ use twilight_model::{
id::Id
};
mod commands;
mod database;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
@@ -74,7 +75,7 @@ fn validate_request(headers: HeaderMap, body: String) -> Result<Interaction, (St
return Err((StatusCode::UNAUTHORIZED, "interaction failed signature verification".to_string()))
};
return Ok(interaction);
Ok(interaction)
}
async fn post_interaction(