Fix Never api key expiration dates (#4965)
closes #4714 We cannot set null expiration dates for api keys. So we will set to 100 years instead of null. If apiKey expires in more that 10 years, it is displayed as "Never expires"
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { NEVER_EXPIRE_DELTA_IN_YEARS } from '@/settings/developers/constants/NeverExpireDeltaInYears.ts';
|
||||
|
||||
export const EXPIRATION_DATES: {
|
||||
value: number | null;
|
||||
label: string;
|
||||
@ -7,5 +9,5 @@ export const EXPIRATION_DATES: {
|
||||
{ label: '90 days', value: 90 },
|
||||
{ label: '1 year', value: 365 },
|
||||
{ label: '2 years', value: 2 * 365 },
|
||||
{ label: 'Never', value: null },
|
||||
{ label: 'Never', value: NEVER_EXPIRE_DELTA_IN_YEARS * 365 },
|
||||
];
|
||||
|
||||
@ -0,0 +1 @@
|
||||
export const NEVER_EXPIRE_DELTA_IN_YEARS = 100;
|
||||
Reference in New Issue
Block a user