mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-17 18:13:21 +02:00
Reserve dialogs
This commit is contained in:
parent
259293f9b3
commit
07cdf2bc7a
13 changed files with 587 additions and 397 deletions
web/src/app
|
@ -308,12 +308,15 @@ class AccountApi {
|
|||
}
|
||||
}
|
||||
|
||||
async deleteReservation(topic) {
|
||||
async deleteReservation(topic, deleteMessages) {
|
||||
const url = accountReservationSingleUrl(config.base_url, topic);
|
||||
console.log(`[AccountApi] Removing topic reservation ${url}`);
|
||||
const headers = {
|
||||
"X-Delete-Messages": deleteMessages ? "true" : "false"
|
||||
}
|
||||
const response = await fetch(url, {
|
||||
method: "DELETE",
|
||||
headers: withBearerAuth({}, session.token())
|
||||
headers: withBearerAuth(headers, session.token())
|
||||
});
|
||||
if (response.status === 401 || response.status === 403) {
|
||||
throw new UnauthorizedError();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue