Verify that ipfs_api_url and ipfs_gateway_url config params are used together
This commit is contained in:
parent
e4f60695d8
commit
ff439c9c81
1 changed files with 3 additions and 0 deletions
|
@ -187,6 +187,9 @@ pub fn parse_config() -> Config {
|
|||
};
|
||||
config.try_instance_url().expect("invalid instance URI");
|
||||
config.try_instance_rsa_key().expect("invalid instance RSA key");
|
||||
if config.ipfs_api_url.is_some() != config.ipfs_gateway_url.is_some() {
|
||||
panic!("both ipfs_api_url and ipfs_gateway_url must be set");
|
||||
};
|
||||
|
||||
config
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue