generated from lucien/actix-react-template
Fixed databse init function
This commit is contained in:
parent
902e96b205
commit
8f8fc0c46e
3 changed files with 13 additions and 8 deletions
|
@ -1,10 +1,10 @@
|
|||
mod create_db;
|
||||
use create_db::init;
|
||||
|
||||
use actix_web::{App, HttpServer, get, Responder, HttpResponse, http::header::ContentType};
|
||||
use actix_files::Files;
|
||||
use serde_json::json;
|
||||
use sqlite::{Connection, State, Error};
|
||||
|
||||
mod create_db;
|
||||
use create_db::init;
|
||||
use sqlite::{Connection, State};
|
||||
|
||||
#[get("/api/hello")]
|
||||
async fn hello() -> impl Responder {
|
||||
|
@ -48,7 +48,7 @@ async fn api() -> impl Responder {
|
|||
|
||||
#[actix_web::main]
|
||||
async fn main() -> Result<(), std::io::Error> {
|
||||
init();
|
||||
let _ = init();
|
||||
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue