Replace all non-alphanumeric symbols during hetzner creation

remotes/1708434123922220183/feature/service-configurations
Inex Code 2021-12-25 12:56:44 +00:00 committed by kherel
parent de13b09f23
commit 72100e483a
1 changed files with 2 additions and 1 deletions

View File

@ -114,7 +114,8 @@ class HetznerApi extends ApiMap {
final apiToken = StringGenerators.apiToken();
final hostname = domainName.split('.')[0];
// Replace all non-alphanumeric characters with an underscore
final hostname = domainName.split('.')[0].replaceAll(RegExp(r'[^a-zA-Z0-9]'), '_');
/// add ssh key when you need it: e.g. "ssh_keys":["kherel"]
/// check the branch name, it could be "development" or "master".