优化履约账号优先级配置
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { createHttpError } from '../../../utils/http.js'
|
||||
import type { HttpErrorLike } from '../../../utils/http.js'
|
||||
import {
|
||||
resolvePersistedCloudtentaclesContext as resolveFulfillmentPersistedCloudtentaclesContext,
|
||||
resolvePersistedCloudtentaclesContextBySourceKeys,
|
||||
} from '../../fulfillment/kuaishou-cloud/cloudtentacles-context.js'
|
||||
|
||||
export {
|
||||
@@ -23,6 +23,7 @@ export type CloudtentaclesContext = {
|
||||
token: string
|
||||
deviceId: string
|
||||
deviceType: number
|
||||
resolvedSourceKey: string
|
||||
}
|
||||
|
||||
export type CloudSkuLikeItem = {
|
||||
@@ -62,9 +63,9 @@ export type PreparedKuaishouCloudBindResource = {
|
||||
bindUrl: string
|
||||
}
|
||||
|
||||
export function resolvePersistedCloudtentaclesContext(): CloudtentaclesContext {
|
||||
export function resolvePersistedCloudtentaclesContext(sourceKeys: unknown[]): CloudtentaclesContext {
|
||||
try {
|
||||
return resolveFulfillmentPersistedCloudtentaclesContext()
|
||||
return resolvePersistedCloudtentaclesContextBySourceKeys(sourceKeys)
|
||||
} catch (error) {
|
||||
if (isMissingCloudtentaclesTokenError(error)) {
|
||||
throw createHttpError('当前 cloudtentacles 没有可用 token,请先到平台配置完成登录校验', {
|
||||
|
||||
Reference in New Issue
Block a user