rename JSON field 'hashcash' to 'pow_token' in API request body
This commit is contained in:
@@ -5,7 +5,7 @@ import "time"
|
||||
// SessionRequest is the body for POST /api/v1/session.
|
||||
type SessionRequest struct {
|
||||
Nick string `json:"nick"`
|
||||
Hashcash string `json:"hashcash,omitempty"`
|
||||
Hashcash string `json:"pow_token,omitempty"` //nolint:tagliatelle
|
||||
}
|
||||
|
||||
// SessionResponse is the response from session creation.
|
||||
|
||||
@@ -147,7 +147,7 @@ func (hdlr *Handlers) handleCreateSession(
|
||||
) {
|
||||
type createRequest struct {
|
||||
Nick string `json:"nick"`
|
||||
Hashcash string `json:"hashcash,omitempty"`
|
||||
Hashcash string `json:"pow_token,omitempty"` //nolint:tagliatelle
|
||||
}
|
||||
|
||||
var payload createRequest
|
||||
|
||||
Reference in New Issue
Block a user