Create a subdomain based on the selected domain.

This commit is contained in:
Philippe Pittoli 2023-07-02 00:10:14 +02:00
parent 8d32f9933b
commit e9808e70f1

View File

@ -336,7 +336,7 @@ handleAction = case _ of
NewDomainAttempt ev -> do
H.liftEffect $ Event.preventDefault ev
{ wsConnection, newDomainForm } <- H.get
{ wsConnection, newDomainForm, selected_domain } <- H.get
let new_domain = newDomainForm.new_domain
case wsConnection, new_domain of
@ -362,8 +362,7 @@ handleAction = case _ of
Open -> do
H.liftEffect $ do
-- TODO: put chosen TLD
ab <- DNSManager.serialize $ DNSManager.MkNewDomain { domain: new_domain }
ab <- DNSManager.serialize $ DNSManager.MkNewDomain { domain: (new_domain <> "." <> selected_domain) }
sendArrayBuffer webSocket ab
appendMessageReset "[😇] Trying to add a new domain"