user addable
This commit is contained in:
+8
-10
@@ -1,4 +1,3 @@
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
extern crate dotenv;
|
||||
|
||||
@@ -7,6 +6,9 @@ use actix_web::{App, HttpResponse, HttpServer};
|
||||
use env_logger;
|
||||
use futures::future::{ok, Either};
|
||||
use log;
|
||||
mod auth;
|
||||
mod database;
|
||||
mod json_serialization;
|
||||
mod models;
|
||||
mod reader;
|
||||
mod schema;
|
||||
@@ -15,14 +17,6 @@ mod views;
|
||||
#[actix_rt::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
env_logger::init();
|
||||
// let feed: String = String::from("https://www.heise.de/rss/heise.rdf");
|
||||
// let channel: Channel = get_feed(&feed).await?;
|
||||
|
||||
// for item in channel.items {
|
||||
// println!("{:?}", item.guid().unwrap());
|
||||
// }
|
||||
|
||||
// Ok(())
|
||||
|
||||
HttpServer::new(|| {
|
||||
let app = App::new()
|
||||
@@ -30,8 +24,12 @@ async fn main() -> std::io::Result<()> {
|
||||
let passed: bool;
|
||||
let request_url: String = String::from(req.uri().path().clone());
|
||||
|
||||
log::info!("Request Url: {}", request_url);
|
||||
if req.path().contains("/reader/") {
|
||||
todo!("implement");
|
||||
match auth::process_token(&req) {
|
||||
Ok(_token) => passed = true,
|
||||
Err(_message) => passed = false,
|
||||
}
|
||||
} else {
|
||||
passed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user