mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
fix registry rm command (#2955)
This commit is contained in:
@@ -167,8 +167,9 @@ pub struct RemovePackageParams {
|
||||
pub id: PackageId,
|
||||
pub version: VersionString,
|
||||
#[ts(skip)]
|
||||
#[arg(skip)]
|
||||
#[serde(rename = "__auth_signer")]
|
||||
pub signer: AnyVerifyingKey,
|
||||
pub signer: Option<AnyVerifyingKey>,
|
||||
}
|
||||
|
||||
pub async fn remove_package(
|
||||
@@ -180,6 +181,8 @@ pub async fn remove_package(
|
||||
}: RemovePackageParams,
|
||||
) -> Result<(), Error> {
|
||||
let peek = ctx.db.peek().await;
|
||||
let signer =
|
||||
signer.ok_or_else(|| Error::new(eyre!("missing signer"), ErrorKind::InvalidRequest))?;
|
||||
let signer_guid = peek.as_index().as_signers().get_signer(&signer)?;
|
||||
|
||||
ctx.db
|
||||
|
||||
@@ -34,6 +34,7 @@ pub fn package_api<C: Context>() -> ParentHandler<C> {
|
||||
.subcommand(
|
||||
"remove",
|
||||
from_fn_async(add::remove_package)
|
||||
.with_metadata("get_signer", Value::Bool(true))
|
||||
.no_display()
|
||||
.with_about("Remove package from registry index")
|
||||
.with_call_remote::<CliContext>(),
|
||||
|
||||
Reference in New Issue
Block a user