summaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2023-08-09 18:27:30 +0200
committerTimo Kösters <timo@koesters.xyz>2023-08-09 18:27:30 +0200
commitc028e0553c541d954b50f82f8ea058c43d8b7d22 (patch)
treefee8f67c02c320cb47835cdbf7828900a4a2247b /src/database
parent3e518773e20849bb712c7942fcc2d0a5147f7868 (diff)
downloadconduit-c028e0553c541d954b50f82f8ea058c43d8b7d22.zip
feat: registration tokens
Diffstat (limited to 'src/database')
-rw-r--r--src/database/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs
index b36347d..e247d9f 100644
--- a/src/database/mod.rs
+++ b/src/database/mod.rs
@@ -267,6 +267,10 @@ impl KeyValueDatabase {
}
};
+ if config.registration_token == Some(String::new()) {
+ return Err(Error::bad_config("Registration token is empty"));
+ }
+
if config.max_request_size < 1024 {
error!(?config.max_request_size, "Max request size is less than 1KB. Please increase it.");
}