feat: switch to revolt.js@6.0.0 + new revolt-api

This commit is contained in:
Paul Makles
2022-04-09 15:47:04 +01:00
parent e9585a66a8
commit 48ff1dcf92
91 changed files with 528 additions and 460 deletions

View File

@@ -81,7 +81,7 @@ export const Notifications = observer(() => {
// tell the server we just subscribed
const json = sub.toJSON();
if (json.keys) {
client.req("POST", "/push/subscribe", {
client.api.post("/push/subscribe", {
endpoint: sub.endpoint,
...(json.keys as {
p256dh: string;
@@ -96,7 +96,7 @@ export const Notifications = observer(() => {
sub?.unsubscribe();
setPushEnabled(false);
client.req("POST", "/push/unsubscribe");
client.api.post("/push/unsubscribe");
}
}
} catch (err) {