diff --git a/api/gleam.toml b/api/gleam.toml index 4670b71..5da810a 100644 --- a/api/gleam.toml +++ b/api/gleam.toml @@ -14,7 +14,7 @@ version = "1.0.0" [dependencies] gleam_stdlib = ">= 0.44.0 and < 2.0.0" -wisp = ">= 1.8.0 and < 2.0.0" +wisp = ">= 2.0.0 and < 3.0.0" mist = ">= 5.0.3 and < 6.0.0" gleam_erlang = ">= 1.3.0 and < 2.0.0" gleam_http = ">= 4.1.1 and < 5.0.0" diff --git a/api/manifest.toml b/api/manifest.toml index 55e6da5..dbca0af 100644 --- a/api/manifest.toml +++ b/api/manifest.toml @@ -25,7 +25,7 @@ packages = [ { name = "shared", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib", "simplifile"], source = "local", path = "../shared" }, { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, { name = "telemetry", version = "1.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "telemetry", source = "hex", outer_checksum = "7015FC8919DBE63764F4B4B87A95B7C0996BD539E0D499BE6EC9D7F3875B79E6" }, - { name = "wisp", version = "1.8.0", build_tools = ["gleam"], requirements = ["directories", "exception", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_json", "gleam_stdlib", "houdini", "logging", "marceau", "mist", "simplifile"], otp_app = "wisp", source = "hex", outer_checksum = "0FE9049AFFB7C8D5FC0B154EEE2704806F4D51B97F44925D69349B3F4F192957" }, + { name = "wisp", version = "2.0.0", build_tools = ["gleam"], requirements = ["directories", "exception", "filepath", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_json", "gleam_stdlib", "houdini", "logging", "marceau", "mist", "simplifile"], otp_app = "wisp", source = "hex", outer_checksum = "E9E4CEE4A5ACB41E3D9CFEF7AB07BF7DF670AB32E1CB434A61C6DA6859C66168" }, ] [requirements] @@ -37,4 +37,4 @@ gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } gleeunit = { version = ">= 1.0.0 and < 2.0.0" } mist = { version = ">= 5.0.3 and < 6.0.0" } shared = { path = "../shared" } -wisp = { version = ">= 1.8.0 and < 2.0.0" } +wisp = { version = ">= 2.0.0 and < 3.0.0" } diff --git a/api/src/api/routes/abilities.gleam b/api/src/api/routes/abilities.gleam index 0f0c46d..d1774ab 100644 --- a/api/src/api/routes/abilities.gleam +++ b/api/src/api/routes/abilities.gleam @@ -6,7 +6,7 @@ import wisp pub fn all(data: data.Data) { let json = json.array(data.abilities, ability.ability_to_json) - wisp.json_response(json.to_string_tree(json), 200) + wisp.json_response(json.to_string(json), 200) } pub fn single(data: data.Data, id: String) { @@ -16,10 +16,7 @@ pub fn single(data: data.Data, id: String) { case single { Ok(ability) -> - wisp.json_response( - json.to_string_tree(ability.ability_to_json(ability)), - 200, - ) + wisp.json_response(json.to_string(ability.ability_to_json(ability)), 200) _ -> wisp.not_found() } } diff --git a/api/src/api/routes/classes.gleam b/api/src/api/routes/classes.gleam index 43413b0..fd35afa 100644 --- a/api/src/api/routes/classes.gleam +++ b/api/src/api/routes/classes.gleam @@ -6,7 +6,7 @@ import wisp pub fn all(data: data.Data) { let json = json.array(data.classes, class.class_to_json) - wisp.json_response(json.to_string_tree(json), 200) + wisp.json_response(json.to_string(json), 200) } pub fn single(data: data.Data, id: String) { @@ -16,7 +16,7 @@ pub fn single(data: data.Data, id: String) { case single { Ok(class) -> - wisp.json_response(json.to_string_tree(class.class_to_json(class)), 200) + wisp.json_response(json.to_string(class.class_to_json(class)), 200) _ -> wisp.not_found() } } diff --git a/api/src/api/routes/domains.gleam b/api/src/api/routes/domains.gleam index 7db1a94..acde4a6 100644 --- a/api/src/api/routes/domains.gleam +++ b/api/src/api/routes/domains.gleam @@ -6,7 +6,7 @@ import wisp pub fn all(data: data.Data) { let json = json.array(data.domains, domain.domain_to_json) - wisp.json_response(json.to_string_tree(json), 200) + wisp.json_response(json.to_string(json), 200) } pub fn single(data: data.Data, id: String) { @@ -16,10 +16,7 @@ pub fn single(data: data.Data, id: String) { case single { Ok(domain) -> - wisp.json_response( - json.to_string_tree(domain.domain_to_json(domain)), - 200, - ) + wisp.json_response(json.to_string(domain.domain_to_json(domain)), 200) _ -> wisp.not_found() } } diff --git a/api/src/api/routes/subclasses.gleam b/api/src/api/routes/subclasses.gleam index efc58c1..bb80872 100644 --- a/api/src/api/routes/subclasses.gleam +++ b/api/src/api/routes/subclasses.gleam @@ -6,7 +6,7 @@ import wisp pub fn all(data: data.Data) { let json = json.array(data.subclasses, subclass.subclass_to_json) - wisp.json_response(json.to_string_tree(json), 200) + wisp.json_response(json.to_string(json), 200) } pub fn single(data: data.Data, id: String) { @@ -16,10 +16,7 @@ pub fn single(data: data.Data, id: String) { case single { Ok(class) -> - wisp.json_response( - json.to_string_tree(subclass.subclass_to_json(class)), - 200, - ) + wisp.json_response(json.to_string(subclass.subclass_to_json(class)), 200) _ -> wisp.not_found() } }