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:
parent
f79348817f
commit
7ca9afad57
7 changed files with 15 additions and 13 deletions
web/src/components
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue