From 5911e59a27949785588d74fc05f29181b60146fe Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 5 Oct 2024 20:52:07 -0700 Subject: [PATCH] Dont include refresh_token from API --- src-ui/src/app/data/mail-account.ts | 2 -- src-ui/src/app/services/rest/mail-account.service.ts | 3 +-- src/paperless_mail/serialisers.py | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src-ui/src/app/data/mail-account.ts b/src-ui/src/app/data/mail-account.ts index b56917044..81c3c57d2 100644 --- a/src-ui/src/app/data/mail-account.ts +++ b/src-ui/src/app/data/mail-account.ts @@ -31,7 +31,5 @@ export interface MailAccount extends ObjectWithPermissions { account_type: MailAccountType - refresh_token?: string - expiration?: string // Date } diff --git a/src-ui/src/app/services/rest/mail-account.service.ts b/src-ui/src/app/services/rest/mail-account.service.ts index 7e06cfaee..c5c2c79e0 100644 --- a/src-ui/src/app/services/rest/mail-account.service.ts +++ b/src-ui/src/app/services/rest/mail-account.service.ts @@ -33,8 +33,7 @@ export class MailAccountService extends AbstractPaperlessService { } update(o: MailAccount) { - // Remove refresh_token and expiration from the object before updating - delete o.refresh_token + // Remove expiration from the object before updating delete o.expiration return super.update(o).pipe(tap(() => this.reload())) } diff --git a/src/paperless_mail/serialisers.py b/src/paperless_mail/serialisers.py index 40dac8cc7..5623f62c3 100644 --- a/src/paperless_mail/serialisers.py +++ b/src/paperless_mail/serialisers.py @@ -40,7 +40,6 @@ class MailAccountSerializer(OwnedObjectSerializer): "permissions", "set_permissions", "account_type", - "refresh_token", "expiration", ]