mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Fix: Preserve null value for "Never" expiration option (#2605)
Fixed reactive block in expirationInput.svelte to check for null before converting to ISO date. When "Never" is selected, value now remains null instead of being converted to '1970-01-01'. This allows the API to correctly handle null expiration dates for API keys and file tokens.
This commit is contained in:
1 parent
553587eb6c
commit
273488f71f
3 files changed
+25
-3
No files matched your search
@@ -134,7 +134,10 @@
|
||||
value = expirationSelect === 'custom' ? expirationCustom : expirationSelect;
|
||||
}
|
||||
|
||||
value = toLocaleDateISO(new Date(value).getTime());
|
||||
// Only convert to ISO date if value is not null
|
||||
if (value !== null) {
|
||||
value = toLocaleDateISO(new Date(value).getTime());
|
||||
}
|
||||
}
|
||||
|
||||
$: helper =
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
let isSubmitting = writable(false);
|
||||
|
||||
let scopes: string[] = [];
|
||||
let name = '',
|
||||
expire = '';
|
||||
let name = '';
|
||||
let expire: string | null = null;
|
||||
|
||||
async function create() {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user