diff --git a/Cargo.toml b/Cargo.toml index 70ed1df..c92476d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,6 @@ incremental = true [profile.release] lto = "fat" -incremental = true codegen-units = 1 # For releases also try to max optimizations for dependencies: @@ -59,4 +58,3 @@ codegen-units = 1 opt-level = 3 [profile.release.package."*"] opt-level = 3 - diff --git a/Rb.yaml b/Rb.yaml index 8a3f881..4bf3eac 100644 --- a/Rb.yaml +++ b/Rb.yaml @@ -1,8 +1,9 @@ default: address: "0.0.0.0" - ports: 8000 + port: 8000 debug: + port: 8001 keep_alive: 5 read_timeout: 5 write_timeout: 5 diff --git a/rustfmt.toml b/rustfmt.toml index 8e8627b..6e48dc7 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1,4 @@ +unstable_features = true binop_separator = "Front" blank_lines_lower_bound = 0 blank_lines_upper_bound = 1 @@ -49,7 +50,6 @@ reorder_imports = true reorder_modules = true report_fixme = "Always" report_todo = "Always" -required_version = "1.4.37" skip_children = false space_after_colon = true space_before_colon = false @@ -60,7 +60,6 @@ tab_spaces = 4 trailing_comma = "Vertical" trailing_semicolon = true type_punctuation_density = "Wide" -unstable_features = false use_field_init_shorthand = false use_small_heuristics = "Default" use_try_shorthand = false diff --git a/src/schema.rs b/src/schema.rs index c075395..db8b2c5 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -21,7 +21,4 @@ table! { joinable!(posts -> sections (section_id)); -allow_tables_to_appear_in_same_query!( - posts, - sections, -); +allow_tables_to_appear_in_same_query!(posts, sections,); diff --git a/test.py b/test.py index eff2639..3e1a1bb 100644 --- a/test.py +++ b/test.py @@ -12,8 +12,8 @@ data = { "shortname": "short", } -r = requests.post("http://localhost:8000/v1/sections", headers=headers, json=data) +r = requests.post("http://localhost:8000/api/v1/sections", headers=headers, json=data) print(r.content) print(r.status_code) -r = requests.get("http://localhost:8000/v1/sections?offset=0&limit=100") +r = requests.get("http://localhost:8000/api/v1/sections?offset=0&limit=100") print(r.json())