remove our assets dir service, we just use the forgejo assets

This commit is contained in:
Joe Ardent 2024-03-11 08:25:18 -07:00
parent fe6b05313f
commit eb3fe1a8a7
2 changed files with 1 additions and 11 deletions

View file

@ -12,7 +12,6 @@ use axum::{
use clap::Parser;
use sqlx::sqlite::{SqliteConnectOptions, SqlitePool, SqlitePoolOptions};
use tokio::net::TcpListener;
use tower_http::services::ServeDir;
#[macro_use]
extern crate justerror;
@ -29,18 +28,12 @@ async fn main() {
use handlers::handlers::{get_signup, payment_success, post_signup};
init();
// for javascript and css
// TODO: figure out how to intern these contents
let assets_dir = std::env::current_dir().unwrap().join("assets");
let assets_svc = ServeDir::new(assets_dir.as_path());
let pool = db().await;
sqlx::migrate!().run(&pool).await.unwrap();
// the core application, defining the routes and handlers
let app = Router::new()
.nest_service("/assets", assets_svc)
.stripped_clone("/signup/", get(get_signup).post(post_signup))
.stripped_clone("/payment_success/", get(payment_success))
.route("/payment_success/:receipt", get(payment_success))

View file

@ -4,8 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ title }} - What 2 Watch{% endblock %}</title>
<link rel="stylesheet" href="/assets/ww.css">
<title>{% block title %}{{ title }}{% endblock %}</title>
<link rel="stylesheet" href="/assets/css/index.css">
<link rel="stylesheet" href="/assets/css/theme-forgejo-auto.css">
@ -23,8 +22,6 @@
<div id="footer">
{% block footer %}{% endblock %}
</div>
<script src="/assets/htmx.min.js"></script>
</body>
</html>