fix: Fix resolve_export_path typo and remove unused PathBuf imports
All checks were successful
BotServer CI/CD / build (push) Successful in 4m28s
All checks were successful
BotServer CI/CD / build (push) Successful in 4m28s
This commit is contained in:
parent
5006159008
commit
44669c3825
4 changed files with 3 additions and 4 deletions
|
|
@ -196,7 +196,7 @@ fn execute_export(
|
||||||
file_path: &str,
|
file_path: &str,
|
||||||
data: Dynamic,
|
data: Dynamic,
|
||||||
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let full_path = resolve_export_path(state, user, file_path)?;
|
let full_path = resolve_file_path(state, user, file_path)?;
|
||||||
let extension = Path::new(&full_path)
|
let extension = Path::new(&full_path)
|
||||||
.extension()
|
.extension()
|
||||||
.and_then(|e| e.to_str())
|
.and_then(|e| e.to_str())
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use crate::core::shared::state::AppState;
|
||||||
use diesel::prelude::*;
|
use diesel::prelude::*;
|
||||||
use log::{error, info, trace, warn};
|
use log::{error, info, trace, warn};
|
||||||
use rhai::{Dynamic, Engine};
|
use rhai::{Dynamic, Engine};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::Path;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
pub fn use_tool_keyword(state: Arc<AppState>, user: UserSession, engine: &mut Engine) {
|
pub fn use_tool_keyword(state: Arc<AppState>, user: UserSession, engine: &mut Engine) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
use diesel::prelude::*;
|
use diesel::prelude::*;
|
||||||
use log::{debug, info, warn};
|
use log::{debug, info, warn};
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use std::path::PathBuf;
|
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use crate::core::shared::utils::DbPool;
|
use crate::core::shared::utils::DbPool;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use serde_json::Value;
|
||||||
// use std::collections::HashMap;
|
// use std::collections::HashMap;
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::Path;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue