From f213132a78754a38feb28a5664a5e15ed0ceefaf Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Tue, 29 Jul 2025 13:17:05 +0100 Subject: [PATCH] knotserver: minor fixups to xrpc APIs Signed-off-by: oppiliappan --- knotserver/xrpc/router.go | 2 +- knotserver/xrpc/set_default_branch.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/knotserver/xrpc/router.go b/knotserver/xrpc/router.go index f02a8d8e..5d2191a1 100644 --- a/knotserver/xrpc/router.go +++ b/knotserver/xrpc/router.go @@ -134,7 +134,7 @@ var GitError = func(e error) XrpcError { func GenericError(err error) XrpcError { return NewXrpcError( - WithTag("InvalidRepo"), + WithTag("Generic"), WithError(err), ) } diff --git a/knotserver/xrpc/set_default_branch.go b/knotserver/xrpc/set_default_branch.go index 06c9a05e..539444ae 100644 --- a/knotserver/xrpc/set_default_branch.go +++ b/knotserver/xrpc/set_default_branch.go @@ -23,7 +23,7 @@ func (x *Xrpc) SetDefaultBranch(w http.ResponseWriter, r *http.Request) { writeError(w, e, http.StatusBadRequest) } - actorDid, ok := r.Context().Value(ActorDid).(*syntax.DID) + actorDid, ok := r.Context().Value(ActorDid).(syntax.DID) if !ok { fail(MissingActorDidError) return @@ -83,5 +83,5 @@ func (x *Xrpc) SetDefaultBranch(w http.ResponseWriter, r *http.Request) { return } - w.WriteHeader(http.StatusNoContent) + w.WriteHeader(http.StatusOK) } -- 2.51.2