Browse Source

Add expiration date to access

pull/7709/head
Thomas Kaul 4 days ago
parent
commit
07996613fc
  1. 2
      apps/api/src/app/access/access.service.ts
  2. 2
      apps/client/src/app/components/header/header.component.ts

2
apps/api/src/app/access/access.service.ts

@ -62,7 +62,7 @@ export class AccessService {
}
public isExpired({ expiresAt }: Pick<Access, 'expiresAt'>) {
return expiresAt ? isBefore(expiresAt, new Date()) : false;
return isBefore(expiresAt, new Date());
}
public async updateAccess({

2
apps/client/src/app/components/header/header.component.ts

@ -97,7 +97,7 @@ export class GfHeaderComponent implements OnChanges {
protected readonly accesses = computed(() => {
return this.user()?.access?.filter(({ expiresAt }) => {
return !expiresAt || !isBefore(expiresAt, new Date());
return !isBefore(expiresAt, new Date());
});
});

Loading…
Cancel
Save