Changed database to a less generic name.

This commit is contained in:
2022-07-11 09:13:43 -04:00
parent 5839cb93a2
commit 450e4fb53d
2 changed files with 13 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ use tide::{
mod database;
mod settings;
use database::Database;
use database::MoreThanText;
use settings::Settings;
#[async_std::main]
@@ -19,8 +19,8 @@ async fn main() -> tide::Result<()> {
Ok(())
}
async fn app_setup() -> tide::Server<Database> {
let db = Database::new();
async fn app_setup() -> tide::Server<MoreThanText> {
let db = MoreThanText::new();
let mut app = tide::with_state(db);
app.at("/").get(home);
app.with(
@@ -30,7 +30,7 @@ async fn app_setup() -> tide::Server<Database> {
return app;
}
async fn home(_req: Request<Database>) -> tide::Result {
async fn home(_req: Request<MoreThanText>) -> tide::Result {
let mut res = Response::new(StatusCode::Ok);
res.set_body("<!DOCTYPE html>
<html>