taler-mailbox

Service for asynchronous wallet-to-wallet payment messages
Log | Files | Refs | Submodules | README | LICENSE

commit cf9841d0292d50dc3550718142a5fd514ebc7322
parent 8ef1cff6b7c441f7d3eae2876299700b62f08bac
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Tue, 11 Nov 2025 15:36:43 +0100

minor change

Diffstat:
Mcmd/mailbox-server/main_test.go | 12++++--------
Mpkg/rest/mailbox.go | 2+-
2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/cmd/mailbox-server/main_test.go b/cmd/mailbox-server/main_test.go @@ -163,7 +163,7 @@ func TestPostMessage(t *testing.T) { } func TestGetKeysEmpty(t *testing.T) { - req, _ := http.NewRequest("GET", "/keys/"+testAliceHashedSigningKeyString, nil) + req, _ := http.NewRequest("GET", "/info/"+testAliceHashedSigningKeyString, nil) response := executeRequest(req) checkResponseCode(t, http.StatusNotFound, response.Code) } @@ -199,7 +199,7 @@ func TestMailboxRegistration(t *testing.T) { req, _ := http.NewRequest("POST", "/register", bytes.NewReader(jsonMsg)) response := executeRequest(req) checkResponseCode(t, http.StatusNoContent, response.Code) - req, _ = http.NewRequest("GET", "/keys/"+testAliceHashedSigningKeyString, nil) + req, _ = http.NewRequest("GET", "/info/"+testAliceHashedSigningKeyString, nil) response = executeRequest(req) checkResponseCode(t, http.StatusOK, response.Code) body := response.Body.String() @@ -262,20 +262,16 @@ func TestMailboxRegistrationPaid(t *testing.T) { response := executeRequest(req) checkResponseCode(t, http.StatusPaymentRequired, response.Code) - req, _ = http.NewRequest("GET", "/keys/"+testAliceHashedSigningKeyString, nil) + req, _ = http.NewRequest("GET", "/info/"+testAliceHashedSigningKeyString, nil) response = executeRequest(req) checkResponseCode(t, http.StatusNotFound, response.Code) merchServerRespondsPaid = true - req, _ = http.NewRequest("GET", "/keys/"+testAliceHashedSigningKeyString, nil) + req, _ = http.NewRequest("GET", "/info/"+testAliceHashedSigningKeyString, nil) response = executeRequest(req) checkResponseCode(t, http.StatusOK, response.Code) - - req, _ = http.NewRequest("GET", "/keys/"+testAliceHashedSigningKeyString, nil) - response = executeRequest(req) merchServerRespondsPaid = false - checkResponseCode(t, http.StatusOK, response.Code) body := response.Body.String() if body == "" { t.Errorf("Expected response, Got %s", body) diff --git a/pkg/rest/mailbox.go b/pkg/rest/mailbox.go @@ -671,10 +671,10 @@ func (m *Mailbox) setupHandlers() { /* Mailbox API */ m.Router.HandleFunc("/register", m.registerMailboxResponse).Methods("POST") + m.Router.HandleFunc("/info/{h_mailbox}", m.getKeysResponse).Methods("GET") m.Router.HandleFunc("/{h_mailbox}", m.sendMessageResponse).Methods("POST") m.Router.HandleFunc("/{h_mailbox}", m.getMessagesResponse).Methods("GET") m.Router.HandleFunc("/{mailbox}", m.deleteMessagesResponse).Methods("DELETE") - m.Router.HandleFunc("/keys/{h_mailbox}", m.getKeysResponse).Methods("GET") } func (m *Mailbox) Logf(loglevel LogLevel, fmt string, args ...any) {