arnaucube
arnaucube/tor-eth-online-shopPublic Self-hosted repository
tor-eth-online-shop/rest.go
rest.goRaw
 1package main
 2
 3import (
 4	"fmt"
 5	"net/http"
 6)
 7
 8func handlePurchase(w http.ResponseWriter, r *http.Request) {
 9	challenge, err := generateChallenge(20)
10	if err != nil {
11		panic(err)
12		return
13	}
14	fmt.Fprintf(w, challenge)
15}
16func handleTxId(w http.ResponseWriter, r *http.Request) {
17
18	fmt.Fprintf(w, "ack")
19}