mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
refactor, fix tests
This commit is contained in:
1 parent
43da5c91ad
commit
7897ef730e
9 files changed
+11
-11
No files matched your search
@@ -9,7 +9,7 @@ use enums::by_table::model_weights::{
|
||||
};
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::{anyhow, AnyhowResult};
|
||||
use mysql_queries::queries::model_weights::create_weight::{create_weight, CreateModelWeightsArgs};
|
||||
use mysql_queries::queries::model_weights::create::create_weight::{create_weight, CreateModelWeightsArgs};
|
||||
use mysql_queries::queries::users::user::get_user_token_by_username::get_user_token_by_username;
|
||||
use tokens::tokens::model_weights::ModelWeightToken;
|
||||
use tokens::tokens::users::UserToken;
|
||||
|
||||
@@ -15,7 +15,7 @@ use filesys::file_size::file_size;
|
||||
use filesys::path_to_string::path_to_string;
|
||||
use hashing::sha256::sha256_hash_file::sha256_hash_file;
|
||||
use mimetypes::mimetype_for_bytes::get_mimetype_for_bytes;
|
||||
use mysql_queries::queries::model_weights::create_weight::{
|
||||
use mysql_queries::queries::model_weights::create::create_weight::{
|
||||
create_weight,
|
||||
CreateModelWeightsArgs,
|
||||
};
|
||||
|
||||
File renamed without changes.
@@ -1 +1,2 @@
|
||||
pub mod create_model_weight_from_voice_conversion_download_job;
|
||||
pub mod create_model_weight_from_voice_conversion_download_job;
|
||||
pub mod create_weight;
|
||||
@@ -1 +1,2 @@
|
||||
pub mod set_model_weight_avatar;
|
||||
pub mod set_model_weight_avatar;
|
||||
pub mod update_weight;
|
||||
File renamed without changes.
@@ -1,5 +1,4 @@
|
||||
pub mod create;
|
||||
pub mod create_weight;
|
||||
pub mod delete_weights;
|
||||
pub mod edit;
|
||||
pub mod get_weight;
|
||||
@@ -8,4 +7,3 @@ pub mod list;
|
||||
pub mod migration;
|
||||
pub mod model_weight_info_lite;
|
||||
pub mod tests;
|
||||
pub mod update_weight;
|
||||
@@ -17,8 +17,8 @@ mod tests {
|
||||
use enums::common::visibility::Visibility;
|
||||
use tokens::tokens::{model_weights::ModelWeightToken, users::UserToken};
|
||||
|
||||
use crate::queries::model_weights::create_weight::create_weight;
|
||||
use crate::queries::model_weights::create_weight::CreateModelWeightsArgs;
|
||||
use crate::queries::model_weights::create::create_weight::create_weight;
|
||||
use crate::queries::model_weights::create::create_weight::CreateModelWeightsArgs;
|
||||
use crate::queries::model_weights::delete_weights::{
|
||||
delete_weights_as_mod,
|
||||
delete_weights_as_user,
|
||||
@@ -298,11 +298,11 @@ mod tests {
|
||||
can_see_deleted,
|
||||
mysql_pool: &pool,
|
||||
}).await?;
|
||||
for weight in weights_by_username.iter() {
|
||||
for weight in weights_by_username.records.iter() {
|
||||
// print weight
|
||||
println!("weight: {:?}", weight.creator_username);
|
||||
}
|
||||
assert_eq!(weights_by_username.len(), 5);
|
||||
assert_eq!(weights_by_username.records.len(), 5);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ use enums::common::visibility::Visibility;
|
||||
use http_server_common::response::response_success_helpers::simple_json_success;
|
||||
use http_server_common::response::serialize_as_json_error::serialize_as_json_error;
|
||||
use mysql_queries::queries::model_weights::get_weight::get_weight_by_token;
|
||||
use mysql_queries::queries::model_weights::update_weight::{ update_weights, UpdateWeightArgs };
|
||||
use mysql_queries::queries::model_weights::edit::update_weight::{ update_weights, UpdateWeightArgs };
|
||||
use tokens::tokens::model_weights::ModelWeightToken;
|
||||
|
||||
use crate::server_state::ServerState;
|
||||
|
||||
Reference in new issue
Block a user