diff options
author | Emile <hanemile@protonmail.com> | 2019-10-07 15:38:56 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-07 15:38:56 +0200 |
commit | e67df19dfa7ffa652cd0029b19cb7ef382c3f4d7 (patch) | |
tree | 0d474881b138f836984a2a12bf2669e7f9ec0107 | |
parent | e72b27b7074a0f8a6d5ffebba6de89a94a40a5d0 (diff) |
spawn a container on registration
-rw-r--r-- | src/http.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/http.go b/src/http.go index 5ed4957..3032378 100644 --- a/src/http.go +++ b/src/http.go @@ -63,6 +63,9 @@ func registerPostHandler(w http.ResponseWriter, r *http.Request) { accesscode := newAccessCode() log.Printf("Generated a new AccessCode for user %s: %s", username, accesscode) + // generate a new companion + spawnCompanion(username, accesscode) + // redirect the user to the front page http.Redirect(w, r, "/", http.StatusTemporaryRedirect) } |