mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 13:22:56 +01:00
nip-86: stat.
This commit is contained in:
parent
fcc231e9d7
commit
7df4cdcb4f
@ -168,6 +168,8 @@ func DecodeRequest(req Request) (MethodParams, error) {
|
||||
Pubkey: pubkey,
|
||||
DisallowMethods: disallowedMethods,
|
||||
}, nil
|
||||
case "stats":
|
||||
return Stats{}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown method '%s'", req.Method)
|
||||
}
|
||||
@ -200,6 +202,7 @@ var (
|
||||
_ MethodParams = (*ListDisallowedKinds)(nil)
|
||||
_ MethodParams = (*GrantAdmin)(nil)
|
||||
_ MethodParams = (*RevokeAdmin)(nil)
|
||||
_ MethodParams = (*Stats)(nil)
|
||||
)
|
||||
|
||||
type SupportedMethods struct{}
|
||||
@ -323,3 +326,7 @@ type RevokeAdmin struct {
|
||||
}
|
||||
|
||||
func (RevokeAdmin) MethodName() string { return "revokeadmin" }
|
||||
|
||||
type Stats struct{}
|
||||
|
||||
func (Stats) MethodName() string { return "stats" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user