feat: update, replace, delete on user object, first draft

This commit is contained in:
2024-05-11 13:31:37 +02:00
parent 3d559f8ae5
commit 1f6d8a406b
2 changed files with 42 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ pub struct AdminContext {
impl Default for AdminContext {
fn default() -> Self {
AdminContext {
base: None,
base: None, // TODO: what is this used for?
language_code: Some("en-us".to_string()), // Default language code
language_bidi: Some(false), // Default language bidi
user: None, //UserType::default(), // Assuming UserType has a Default impl
@@ -117,7 +117,7 @@ pub async fn list_item_collection<S: AdminState + Clone + Send + Sync + 'static>
let repo = repo.lock().await;
let admin_model = registry
.get_model(&app_key, &model_key)
.expect("Admin Model not found?");
.expect("Admin Model not found?"); // we will need a proper error route; so something that implements IntoResponse and can be substituted in the unwraps and expects.
AdminContext {
base: base_template(&headers),
available_apps: registry.get_apps(),