fix(admin): 修复授权照片代理未解包全局响应拦截器的问题
authorization-service 全局拦截器将响应包装为 {success, data, timestamp},
代理服务需要从 response.data.data 取实际数据,而非 response.data。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0576733579
commit
a801a46e76
|
|
@ -77,7 +77,10 @@ export class AuthorizationProxyService {
|
|||
const url = `/api/v1/authorization/self-apply-photos?${queryParams.toString()}`;
|
||||
this.logger.debug(`[getSelfApplyPhotos] 请求: ${url}`);
|
||||
const response = await this.httpClient.get(url);
|
||||
const data = response.data;
|
||||
// authorization-service 全局拦截器将响应包装为 {success, data, timestamp}
|
||||
// 实际数据在 response.data.data 中
|
||||
const raw = response.data;
|
||||
const data = raw?.data ?? raw;
|
||||
|
||||
if (!data?.items?.length) {
|
||||
return { items: [], total: data?.total ?? 0, page, limit };
|
||||
|
|
|
|||
Loading…
Reference in New Issue