feat(client): refreshing the page no longer returns a 404
This commit is contained in:
parent
e3f1855711
commit
e672613d50
|
|
@ -6,7 +6,7 @@ use axum::{
|
||||||
};
|
};
|
||||||
use sqlx::Row;
|
use sqlx::Row;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tower_http::{cors::CorsLayer, services::ServeDir};
|
use tower_http::{cors::CorsLayer, services::{ServeDir, ServeFile}};
|
||||||
use tracing::{info, error};
|
use tracing::{info, error};
|
||||||
|
|
||||||
mod auth;
|
mod auth;
|
||||||
|
|
@ -146,7 +146,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
.nest("/api/users", routes::users::router())
|
.nest("/api/users", routes::users::router())
|
||||||
.nest("/api/webdav", routes::webdav::router())
|
.nest("/api/webdav", routes::webdav::router())
|
||||||
.merge(swagger::create_swagger_router())
|
.merge(swagger::create_swagger_router())
|
||||||
.nest_service("/", ServeDir::new("/app/frontend"))
|
.nest_service("/", ServeDir::new("/app/frontend").fallback(ServeFile::new("/app/frontend/index.html")))
|
||||||
.fallback(serve_spa)
|
.fallback(serve_spa)
|
||||||
.layer(CorsLayer::permissive())
|
.layer(CorsLayer::permissive())
|
||||||
.with_state(Arc::new(state));
|
.with_state(Arc::new(state));
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,9 @@ async fn process_file(
|
||||||
|
|
||||||
let saved_file_path = file_service.save_file(&filename, &file_data).await?;
|
let saved_file_path = file_service.save_file(&filename, &file_data).await?;
|
||||||
|
|
||||||
let system_user_id = uuid::Uuid::parse_str("00000000-0000-0000-0000-000000000000")?;
|
// TODO: Make this configurable or fetch from database
|
||||||
|
// Using admin user ID for watch folder documents
|
||||||
|
let system_user_id = uuid::Uuid::parse_str("c2e66705-e54b-4eff-91f5-760cb0a69b62")?;
|
||||||
|
|
||||||
let document = file_service.create_document(
|
let document = file_service.create_document(
|
||||||
&filename,
|
&filename,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use tokio::time::sleep;
|
||||||
|
|
||||||
use readur::models::{DocumentResponse, CreateUser, LoginRequest, LoginResponse};
|
use readur::models::{DocumentResponse, CreateUser, LoginRequest, LoginResponse};
|
||||||
|
|
||||||
const BASE_URL: &str = "http://localhost:8080";
|
const BASE_URL: &str = "http://localhost:8000";
|
||||||
const TIMEOUT: Duration = Duration::from_secs(30);
|
const TIMEOUT: Duration = Duration::from_secs(30);
|
||||||
|
|
||||||
/// Integration test client that handles authentication and common operations
|
/// Integration test client that handles authentication and common operations
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue