about summary refs log tree commit diff stats
path: root/crates/rocie-server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-server/src/main.rs')
-rw-r--r--crates/rocie-server/src/main.rs35
1 files changed, 22 insertions, 13 deletions
diff --git a/crates/rocie-server/src/main.rs b/crates/rocie-server/src/main.rs
index caa210d..5f3b0ff 100644
--- a/crates/rocie-server/src/main.rs
+++ b/crates/rocie-server/src/main.rs
@@ -1,4 +1,3 @@
-use actix_cors::Cors;
 use actix_web::{
     App, HttpServer,
     cookie::{Key, SameSite},
@@ -27,35 +26,47 @@ async fn main() -> Result<(), std::io::Error> {
     #[derive(OpenApi)]
     #[openapi(
         paths(
+            api::get::auth::inventory::amount_by_id,
             api::get::auth::product::product_by_id,
             api::get::auth::product::product_by_name,
             api::get::auth::product::product_suggestion_by_name,
-            api::get::auth::product::products_registered,
-            api::get::auth::product::products_in_storage,
-            api::get::auth::product::products_by_product_parent_id_indirect,
             api::get::auth::product::products_by_product_parent_id_direct,
+            api::get::auth::product::products_by_product_parent_id_indirect,
+            api::get::auth::product::products_in_storage,
+            api::get::auth::product::products_registered,
+            api::get::auth::product::products_without_product_parent,
             api::get::auth::product_parent::product_parents,
             api::get::auth::product_parent::product_parents_toplevel,
             api::get::auth::product_parent::product_parents_under,
+            api::get::auth::recipe::recipe_by_name,
             api::get::auth::recipe::recipe_by_id,
             api::get::auth::recipe::recipes,
+            api::get::auth::recipe::recipes_by_recipe_parent_id_direct,
+            api::get::auth::recipe::recipes_by_recipe_parent_id_indirect,
+            api::get::auth::recipe::recipes_without_recipe_parent,
+            api::get::auth::recipe_parent::recipe_parents,
+            api::get::auth::recipe_parent::recipe_parents_toplevel,
+            api::get::auth::recipe_parent::recipe_parents_under,
+            api::get::auth::unit::unit_by_id,
             api::get::auth::unit::units,
             api::get::auth::unit::units_by_property_id,
-            api::get::auth::unit::unit_by_id,
-            api::get::auth::unit_property::unit_property_by_id,
             api::get::auth::unit_property::unit_properties,
-            api::get::auth::inventory::amount_by_id,
-            api::get::auth::user::users,
+            api::get::auth::unit_property::unit_property_by_id,
             api::get::auth::user::user_by_id,
+            api::get::auth::user::users,
             //
-            api::set::auth::product::register_product,
+            api::get::no_auth::state::is_logged_in,
+            api::get::no_auth::state::can_be_provisioned,
+            //
+            api::set::auth::barcode::buy_barcode,
+            api::set::auth::barcode::consume_barcode,
             api::set::auth::product::associate_barcode,
+            api::set::auth::product::register_product,
             api::set::auth::product_parent::register_product_parent,
             api::set::auth::recipe::add_recipe,
+            api::set::auth::recipe_parent::register_recipe_parent,
             api::set::auth::unit::register_unit,
             api::set::auth::unit_property::register_unit_property,
-            api::set::auth::barcode::buy_barcode,
-            api::set::auth::barcode::consume_barcode,
             api::set::auth::user::register_user,
             //
             api::set::no_auth::user::login,
@@ -90,8 +101,6 @@ async fn main() -> Result<(), std::io::Error> {
 
             let srv = HttpServer::new(move || {
                 App::new()
-                    // TODO: Remove before an actual deploy <2025-09-26>
-                    .wrap(Cors::permissive())
                     .wrap(Logger::new(
                         r#"%a "%r" -> %s %b ("%{Referer}i" "%{User-Agent}i" %T s)"#,
                     ))