From 33819455fc4298a4cc4ae1815e05ec36f69f8ae0 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 Change-Id: mqkxnymrqmzzqqkzplqmntxlpyxyopzt 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 f02a8d8..5d2191a 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 06c9a05..539444a 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.43.0