Remove deprecated JSON encoder/decoder and update dependencies

- Deleted the custom JSON encoder/decoder implementation in favor of the standard library's `encoding/json` package.
- Removed the `next.orly.dev/pkg/encoders/json` package and its associated files.
- Updated `go.mod` to remove the `github.com/nostr-dev-kit/ndk` dependency and bump the version of `lol.mleku.dev` from v1.0.3 to v1.0.4.
- Cleaned up import statements across various files to reflect the removal of the custom JSON package.
- Ensured that all references to the old JSON encoding/decoding methods are replaced with the standard library equivalents.
This commit is contained in:
2025-10-22 11:37:39 +01:00
parent 6cff006e54
commit 117e5924fd
38 changed files with 12 additions and 12377 deletions

View File

@@ -7,8 +7,9 @@ import (
"strings"
"time"
"encoding/json"
"github.com/dgraph-io/badger/v4"
"next.orly.dev/pkg/encoders/json"
)
type Subscription struct {
@@ -192,7 +193,7 @@ func (d *D) GetPaymentHistory(pubkey []byte) ([]Payment, error) {
// IsFirstTimeUser checks if a user is logging in for the first time and marks them as seen
func (d *D) IsFirstTimeUser(pubkey []byte) (bool, error) {
key := fmt.Sprintf("firstlogin:%s", hex.EncodeToString(pubkey))
isFirstTime := false
err := d.DB.Update(
func(txn *badger.Txn) error {
@@ -212,6 +213,6 @@ func (d *D) IsFirstTimeUser(pubkey []byte) (bool, error) {
return err // Return any other error as-is
},
)
return isFirstTime, err
}