fix: user cache age comparison

This commit is contained in:
yanlong.wang 2025-04-01 16:56:21 +08:00
parent f3b82a4d50
commit 0238d26984
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -109,7 +109,7 @@ export class JinaEmbeddingsAuthDTO extends AutoCastable {
const jitter = Math.ceil(Math.random() * 30 * 1000);
if (account && !ignoreCache) {
if (account && age < (180_000 - jitter)) {
if (account && (age < (180_000 - jitter))) {
this.user = account;
this.uid = this.user?.user_id;