mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-05 14:00:41 +08:00
saas: use alternative endpoint for auth
This commit is contained in:
parent
6f657ae19a
commit
0cf4a9ede1
@ -146,7 +146,10 @@ export class JinaEmbeddingsAuthDTO extends AutoCastable {
|
||||
}
|
||||
|
||||
try {
|
||||
const r = await this.jinaEmbeddingsDashboard.validateToken(this.bearerToken);
|
||||
// TODO: go back using validateToken after performance issue fixed
|
||||
const r = ((account?.wallet?.total_balance || 0) > 0) ?
|
||||
await this.jinaEmbeddingsDashboard.authorization(this.bearerToken) :
|
||||
await this.jinaEmbeddingsDashboard.validateToken(this.bearerToken);
|
||||
const brief = r.data;
|
||||
const draftAccount = JinaEmbeddingsTokenAccount.from({
|
||||
...account, ...brief, _id: this.bearerToken,
|
||||
|
Loading…
x
Reference in New Issue
Block a user