knotserver: minor fixups to xrpc APIs #369

merged
opened by oppi.li targeting master from push-mqkxnymrqmzz
Changed files
+3 -3
knotserver
+1 -1
knotserver/xrpc/router.go
···
func GenericError(err error) XrpcError {
return NewXrpcError(
-
WithTag("InvalidRepo"),
+
WithTag("Generic"),
WithError(err),
)
}
+2 -2
knotserver/xrpc/set_default_branch.go
···
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
···
return
}
-
w.WriteHeader(http.StatusNoContent)
+
w.WriteHeader(http.StatusOK)
}