Replace all non-alphanumeric symbols during hetzner creation

pull/83/head
Inex Code 2021-12-25 12:56:44 +00:00
parent c937cfdbb4
commit 30937740b6
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".