function updateDump
updateDump(
dumpId: string,
exempt?: boolean
): Promise<Dump>

Applies request to a dump, for PUT /api/dumps/:dumpId. A new link has its preview fetched and gives the dump its page's title, unless request sets one. A file dump ignores url. A new slug goes through changeSlug, which exempt (a moderator) frees from its rate limit; a new title leaves the slug as it is. Clients get the dump as dump_updated, or a dump_deleted when it turns private and a dump_created when it turns public. Anyone @mentioned in the note is notified, and when it turns public, its followers are as when it is posted (notifyIfWentPublic).

Parameters

dumpId: string
optional
exempt: boolean = false

Return Type

Promise<Dump>

Throws

APIException

404 when there is no such dump, 400 when a new URL isn't a public http(s) URL, a category doesn't exist or the slug isn't valid, 409 when the slug is taken, 429 when it changed too often lately.

Usage

import { updateDump } from "api/services/dump-service.ts";