1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-19 02:53:17 +02:00

Account API endpoint fixes

This commit is contained in:
binwiederhier 2022-12-28 15:51:09 -05:00
parent f79348817f
commit 7ca9afad57
7 changed files with 15 additions and 13 deletions
web/src/components

View file

@ -57,7 +57,7 @@ const Stats = () => {
const { t } = useTranslation();
const { account } = useOutletContext();
if (!account) {
return <></>; // TODO loading
return <></>;
}
const accountType = account.plan.code ?? "none";
const normalize = (value, max) => (value / max * 100);
@ -234,9 +234,9 @@ const DeleteAccount = () => {
const handleDialogSubmit = async (newPassword) => {
try {
await accountApi.delete();
await db.delete();
setDialogOpen(false);
console.debug(`[Account] Account deleted`);
// TODO delete local storage
session.resetAndRedirect(routes.app);
} catch (e) {
console.log(`[Account] Error deleting account`, e);