From a88f9c7398269ad5a25bfae78a14ea20cfca29e9 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Mon, 20 Feb 2023 15:00:16 +0530 Subject: [PATCH] fix signup file containing info of prev signup --- pages/signup.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/signup.go b/pages/signup.go index 68a9f35..57841f9 100644 --- a/pages/signup.go +++ b/pages/signup.go @@ -38,11 +38,11 @@ func SignupPage(c *fiber.Ctx) error { if chmoderr != nil { log.Error(err) } - utils.Bashscript = strings.ReplaceAll(utils.Bashscript, "{{sshkey}}", ssh) - utils.Bashscript = strings.ReplaceAll(utils.Bashscript, "{{email}}", email) - utils.Bashscript = strings.ReplaceAll(utils.Bashscript, "{{username}}", username) + Bashscript := strings.ReplaceAll(utils.Bashscript, "{{sshkey}}", ssh) + Bashscript = strings.ReplaceAll(Bashscript, "{{email}}", email) + Bashscript = strings.ReplaceAll(Bashscript, "{{username}}", username) // write to file - _, err = f.WriteString(utils.Bashscript) + _, err = f.WriteString(Bashscript) if err != nil { log.Error("Error writing to user file", err) return c.SendStatus(fiber.StatusInternalServerError)