You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bit4sat/storage/utils.go

21 lines
273 B
Go

package storage
import (
"net/http"
"git.sp4ke.com/sp4ke/bit4sat/ln"
)
func InvoiceHttpCode(invoice *ln.Invoice) int {
if invoice.Expired {
return http.StatusGone
}
if invoice.Status == "unpaid" {
return http.StatusPaymentRequired
}
return http.StatusOK
}