refactor: import different dependencies only in the correct target binary
Some checks failed
actionlint check / actionlint check (pull_request) Successful in 7s
checkov check / checkov check (pull_request) Successful in 53s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 6s
GitLeaks check / GitLeaks check (pull_request) Successful in 7s
hadolint check / hadolint check (pull_request) Successful in 9s
htmlhint check / htmlhint check (pull_request) Successful in 9s
markdownlint check / markdownlint check (pull_request) Successful in 9s
Prettier check / Prettier check (pull_request) Successful in 10s
Rust check / Rust check (pull_request) Failing after 7m40s
ShellCheck check / ShellCheck check (pull_request) Successful in 12s
Stylelint check / Stylelint check (pull_request) Successful in 11s
yamllint check / yamllint check (pull_request) Successful in 14s

This commit is contained in:
2024-12-29 20:50:06 +01:00
parent 3646aa91c4
commit a83b376f7b
19 changed files with 639 additions and 50 deletions

View File

@ -1,16 +1,26 @@
use crate::errors::error::Error;
use crate::errors::error_vec::ErrorVec;
use crate::errors::task_error::TaskError;
use crate::models::category::{Category, ReoccurrenceInterval};
use crate::models::category::Category;
#[cfg(feature = "server")]
use crate::models::category::ReoccurrenceInterval;
#[cfg(feature = "server")]
use crate::models::subtask::Subtask;
use crate::models::task::{NewTask, Task, TaskWithSubtasks};
#[cfg(feature = "server")]
use crate::server::database_connection::establish_database_connection;
#[cfg(feature = "server")]
use crate::server::subtasks::restore_subtasks_of_task;
#[cfg(feature = "server")]
use chrono::{Datelike, Days, Local, Months, NaiveDate};
#[cfg(feature = "server")]
use diesel::prelude::*;
#[cfg(feature = "server")]
use diesel::{ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl, SelectableHelper};
use dioxus::prelude::*;
#[cfg(feature = "server")]
use time::util::days_in_year_month;
#[cfg(feature = "server")]
use validator::Validate;
#[server]
@ -204,6 +214,7 @@ pub(crate) async fn delete_task(task_id: i32) -> Result<(), ServerFnError<ErrorV
Ok(())
}
#[cfg(feature = "server")]
pub(crate) async fn trigger_task_updated_at(task_id: i32) -> Result<Task, ErrorVec<Error>> {
use crate::schema::tasks::dsl::*;