mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-17 00:45:55 +08:00
saas: use alternative endpoint for auth
This commit is contained in:
parent
5ac7908e6d
commit
f2d31fbcbd
@ -146,7 +146,10 @@ export class JinaEmbeddingsAuthDTO extends AutoCastable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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 brief = r.data;
|
||||||
const draftAccount = JinaEmbeddingsTokenAccount.from({
|
const draftAccount = JinaEmbeddingsTokenAccount.from({
|
||||||
...account, ...brief, _id: this.bearerToken,
|
...account, ...brief, _id: this.bearerToken,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user