web: allow setting token expiration to never when editing

This commit is contained in:
ShipItAndPray
2026-04-09 11:57:57 -05:00
parent 9a2b93f7b2
commit 4b0a4eee3b
2 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -137,8 +137,8 @@ class AccountApi {
token,
label,
};
if (expires > 0) {
body.expires = Math.floor(Date.now() / 1000) + expires;
if (expires >= 0) {
body.expires = expires > 0 ? Math.floor(Date.now() / 1000) + expires : 0;
}
console.log(`[AccountApi] Creating user access token ${url}`);
await fetchOrThrow(url, {