fix: address P0 and P1 issues from code review
- P0-1: restore customExt field in SetStatusReqSchema - P0-2: remove duplicate setGroupAvatar implementation - P1-3: add attach_info pagination support for get_group_album_media_list - P1-5: clean up commented console.log statements - P1-6: remove raw field from GroupAlbumMediaResult
This commit is contained in:
1 parent
c58f4d4085
commit
e2ee528939
9 files changed
+9
-43
No files matched your search
@@ -7,7 +7,6 @@ import { GetMediaListRequestSchema, GetMediaListResponseSchema } from '../proto/
|
||||
export interface GroupAlbumMediaResult {
|
||||
mediaList: any[];
|
||||
nextAttachInfo: string;
|
||||
raw: any;
|
||||
}
|
||||
|
||||
function convertBigIntToString(obj: any): any {
|
||||
@@ -40,7 +39,7 @@ export async function getGroupAlbumMediaList(
|
||||
groupId: groupId.toString(),
|
||||
albumId: albumId,
|
||||
field3: 0,
|
||||
attachInfo: attachInfo, // 填入翻页游标
|
||||
attachInfo: attachInfo,
|
||||
field5: '',
|
||||
},
|
||||
traceId: traceId,
|
||||
@@ -59,7 +58,6 @@ export async function getGroupAlbumMediaList(
|
||||
|
||||
const resp = protoDecode(result.responseData, GetMediaListResponseSchema);
|
||||
|
||||
// 校验外层 TRPC 状态码
|
||||
if (!resp || (resp as any).field1 !== 0) {
|
||||
throw new Error(`fetch album media list error: retCode ${(resp as any)?.field1 || 'unknown'}`);
|
||||
}
|
||||
@@ -71,6 +69,5 @@ export async function getGroupAlbumMediaList(
|
||||
return convertBigIntToString({
|
||||
mediaList,
|
||||
nextAttachInfo,
|
||||
raw: resp
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user