vspd/webapi/status.go
Jamie Holdstock d0dedd3af0
Resolving some TODOs (#71)
* Dont allow duplicate fee addresses

* Load webapi keypair in webapi package.

* Split database test file

* Add extra DB testing.
2020-05-27 14:55:59 +01:00

24 lines
410 B
Go

package webapi
import (
"time"
"github.com/gin-gonic/gin"
)
// pubKey is the handler for "GET /pubkey".
func pubKey(c *gin.Context) {
sendJSONResponse(pubKeyResponse{
Timestamp: time.Now().Unix(),
PubKey: signPubKey,
}, c)
}
// fee is the handler for "GET /fee".
func fee(c *gin.Context) {
sendJSONResponse(feeResponse{
Timestamp: time.Now().Unix(),
FeePercentage: cfg.VSPFee,
}, c)
}