diff --git a/db/db.go b/db/db.go index 316dceb..cd6e43a 100644 --- a/db/db.go +++ b/db/db.go @@ -4,9 +4,8 @@ import ( "database/sql" "errors" "fmt" - "os" - _ "github.com/lib/pq" + "os" ) type Card struct { diff --git a/internalapi/getboltcard.go b/internalapi/getboltcard.go index 357b793..b0d16e9 100644 --- a/internalapi/getboltcard.go +++ b/internalapi/getboltcard.go @@ -50,7 +50,6 @@ func Getboltcard(w http.ResponseWriter, r *http.Request) { jsonData := []byte(`{"status":"OK",` + `"uid": "` + c.Db_uid + `",` + - `"last_counter_value": "` + strconv.FormatUint(uint64(c.Last_counter_value), 10) + `",` + `"lnurlw_enable": "` + c.Lnurlw_enable + `",` + `"tx_limit_sats": "` + strconv.Itoa(c.Tx_limit_sats) + `",` + `"day_limit_sats": "` + strconv.Itoa(c.Day_limit_sats) + `"}`) diff --git a/internalapi/updateboltcard.go b/internalapi/updateboltcard.go index 4566681..a2d1998 100644 --- a/internalapi/updateboltcard.go +++ b/internalapi/updateboltcard.go @@ -1,12 +1,12 @@ package internalapi import ( - "net/http" - "strconv" - "github.com/boltcard/boltcard/db" "github.com/boltcard/boltcard/resp_err" log "github.com/sirupsen/logrus" + "net/http" + "strconv" + ) func Updateboltcard(w http.ResponseWriter, r *http.Request) { diff --git a/sql/create_db_user.sql b/sql/create_db_user.sql index 88792fb..678c8b1 100644 --- a/sql/create_db_user.sql +++ b/sql/create_db_user.sql @@ -1,2 +1,2 @@ DROP USER cardapp; -CREATE USER cardapp WITH PASSWORD '$DB_PASSWORD'; \ No newline at end of file +CREATE USER cardapp WITH PASSWORD 'database_password'; \ No newline at end of file