Merge pull request #1694 from ShipItAndPray/fix/token-expiration-never-edit

Allow edited access tokens to be set to never expire
This commit is contained in:
Philipp C. Heckel
2026-04-11 15:05:59 -04:00
committed by GitHub
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, {