Dont include refresh_token from API

This commit is contained in:
shamoon 2024-10-05 20:52:07 -07:00
parent d76b0ead44
commit 5911e59a27
3 changed files with 1 additions and 5 deletions

View File

@ -31,7 +31,5 @@ export interface MailAccount extends ObjectWithPermissions {
account_type: MailAccountType
refresh_token?: string
expiration?: string // Date
}

View File

@ -33,8 +33,7 @@ export class MailAccountService extends AbstractPaperlessService<MailAccount> {
}
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()))
}

View File

@ -40,7 +40,6 @@ class MailAccountSerializer(OwnedObjectSerializer):
"permissions",
"set_permissions",
"account_type",
"refresh_token",
"expiration",
]