Skip to content

Delete Mod

Stable

Deleting a mod permanently removes it from the registry. Only a maintainer of the mod may delete it.

PropertyValue
Applies toWebapp
TriggerAn authenticated maintainer requests deletion of a mod
PreconditionsThe user is authenticated and is a maintainer of the mod

Inputs

modId : String, required. The identifier of the mod to delete.

Assertions

AssertionStatus
The user must be authenticatedImplemented
The mod must exist in the registryImplemented
The authenticated user must be a maintainer of the modImplemented

Outputs

Result<ModData, ModNotFoundError | NotMaintainerError> : On success, returns the deleted mod record. On failure, returns one of the following error types:

ModNotFoundError : The mod does not exist in the registry.

NotMaintainerError : The authenticated user is not a maintainer of the mod.

Effects

EffectStatus
The mod record is permanently removed from the registryImplemented

Behavior

mermaid
flowchart TD
    Start([deleteMod user modId]) --> Authenticated{User authenticated?}

    Authenticated -- No --> Reject401([Reject: 401 Unauthorized])
    Authenticated -- Yes --> Exists{Mod exists?}

    Exists -- No --> ErrNotFound([Reject: ModNotFoundError])
    Exists -- Yes --> IsMaintainer{User is maintainer?}

    IsMaintainer -- No --> ErrNotMaintainer([Reject: NotMaintainerError])
    IsMaintainer -- Yes --> Delete[Remove mod from registry]

    Delete --> Done([Mod deleted])

    style Reject401 fill:#f87171,color:#fff
    style ErrNotFound fill:#f87171,color:#fff
    style ErrNotMaintainer fill:#f87171,color:#fff
    style Done fill:#4ade80,color:#000

See Also