From 69a51420aad02f114672586fc50e33d6b11a757f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 25 Jan 2021 09:34:05 -0500 Subject: [PATCH] gitsrht-update-hook: update internal auth structure --- gitsrht-update-hook/submitter.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gitsrht-update-hook/submitter.go b/gitsrht-update-hook/submitter.go index 0b7d37f..1e96d86 100644 --- a/gitsrht-update-hook/submitter.go +++ b/gitsrht-update-hook/submitter.go @@ -45,8 +45,9 @@ func initSubmitter() { } type InternalRequestAuthorization struct { - ClientId string `json:"client_id"` - Username string `json:"username"` + ClientID string `json:"client_id"` + NodeID string `json:"node_id"` + Username string `json:"name"` } type BuildSubmitter interface { @@ -269,7 +270,8 @@ func configureRequestAuthorization(submitter BuildSubmitter, req *http.Request) { auth := InternalRequestAuthorization{ - ClientId: clientId, + ClientID: clientId, + NodeID: "git.sr.ht::update-hook", Username: submitter.GetOwnerName(), } authPayload, err := json.Marshal(&auth) -- 2.38.4