aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-07-05 15:29:43 +0000
committerFuwn <[email protected]>2021-07-05 15:29:43 +0000
commit4e32e97fa96620b0d8d06ceccee7661bb85e2894 (patch)
tree7a08f4fc4d9e01ef434fffeaf1b0d46f89d0e9c2
parentrefactor(whirl_api): route scoping (diff)
downloadwhirl-4e32e97fa96620b0d8d06ceccee7661bb85e2894.tar.xz
whirl-4e32e97fa96620b0d8d06ceccee7661bb85e2894.zip
refactor(whirl_api): /api/v1/worlds/info default to empty string intead of "null"
When defaulting to "null", the API request would query for a user with the username "null", by querying for an empty string, no possible false information is provided.
-rw-r--r--crates/whirl_api/src/routes/worlds/info/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/whirl_api/src/routes/worlds/info/mod.rs b/crates/whirl_api/src/routes/worlds/info/mod.rs
index eedac82..6ea1453 100644
--- a/crates/whirl_api/src/routes/worlds/info/mod.rs
+++ b/crates/whirl_api/src/routes/worlds/info/mod.rs
@@ -16,7 +16,7 @@ pub fn info(req: HttpRequest) -> HttpResponse {
"http://www-dynamic.us.worlds.net/cgi-bin/profile.pl?{}",
qstring::QString::from(req.query_string())
.get("username")
- .unwrap_or("null"),
+ .unwrap_or(""),
))
.unwrap();