Update vcard_qr.go
This commit is contained in:
@@ -53,7 +53,7 @@ func CreateQr(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
random := helpers.RandomString(4)
|
random := helpers.RandomString(4)
|
||||||
fileName := fmt.Sprintf("qrs/qr-%s-%s.webp", data.FirstName, random)
|
fileName := fmt.Sprintf("qrs/qr-%s-%s.webp", strings.ReplaceAll(data.FirstName, " ", "_"), random)
|
||||||
tmpPath := fmt.Sprintf("/tmp/%s.webp", data.FirstName)
|
tmpPath := fmt.Sprintf("/tmp/%s.webp", data.FirstName)
|
||||||
|
|
||||||
// 4. Guardar archivo temporal
|
// 4. Guardar archivo temporal
|
||||||
@@ -129,7 +129,6 @@ func CreateQr(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 8. Retornar la URL
|
// 8. Retornar la URL
|
||||||
return c.JSON(fiber.Map{
|
return c.JSON(fiber.Map{
|
||||||
"url": url,
|
"url": url,
|
||||||
|
|||||||
Reference in New Issue
Block a user