refactor(api): move 6 group-album methods to GroupAlbumApi (#6 commit 5/13)
Inlines `actions/group-album.ts` (OIDB sendRawPacket via QunAlbum.trpc.*) and `web-actions/group-album.ts` (HTTP cookie-based) into `apis/group-album.ts::GroupAlbumApi`. Both action files deleted. Pure HTTP helpers in `web/group-album.ts` stay where they are — they're transport-layer code. Method renaming follows the now-standard "drop the redundant suffix" rule (the Api namespace already says `groupAlbum`): getGroupAlbumList → list (HTTP) uploadImageToGroupAlbum → upload (HTTP slice-upload) getGroupAlbumMediaList → getMediaList commentGroupAlbumMedia → comment likeGroupAlbumMedia → like deleteGroupAlbumMedia → delete Callers updated: `instance-context.ts`. `web-actions/index.ts` no longer re-exports the deleted album functions. No tests existed for this surface area, so no test churn. 587/587 tests pass.
This commit is contained in:
1 parent
dad501ebc0
commit
c92daa56df
8 files changed
+302
-358
No files matched your search
@@ -186,12 +186,12 @@ export function buildApiContext(ref: OneBotInstanceContext): ApiActionContext {
|
||||
// Web-backed actions.
|
||||
getGroupHonorInfo: (groupId: number, type: WebHonorType | string) => bridge.getGroupHonorInfo(groupId, type),
|
||||
getGroupEssenceAll: (groupId) => bridge.getGroupEssenceAll(groupId),
|
||||
getGroupAlbumList: (groupId) => bridge.getGroupAlbumList(groupId),
|
||||
uploadImageToGroupAlbum: (groupId, albumId, albumName, filePath) => bridge.uploadImageToGroupAlbum(groupId, albumId, albumName, filePath),
|
||||
getGroupAlbumMediaList: (groupId, albumId, attachInfo) => bridge.getGroupAlbumMediaList(groupId, albumId, attachInfo),
|
||||
commentGroupAlbumMedia: (groupId, albumId, lloc, content) => bridge.commentGroupAlbumMedia(groupId, albumId, lloc, content),
|
||||
deleteGroupAlbumMedia: (groupId, albumId, lloc) => bridge.deleteGroupAlbumMedia(groupId, albumId, lloc),
|
||||
likeGroupAlbumMedia: (groupId, albumId, batchId, lloc, isLike) => bridge.likeGroupAlbumMedia(groupId, albumId, batchId, lloc, isLike),
|
||||
getGroupAlbumList: (groupId) => bridge.apis.groupAlbum.list(groupId),
|
||||
uploadImageToGroupAlbum: (groupId, albumId, albumName, filePath) => bridge.apis.groupAlbum.upload(groupId, albumId, albumName, filePath),
|
||||
getGroupAlbumMediaList: (groupId, albumId, attachInfo) => bridge.apis.groupAlbum.getMediaList(groupId, albumId, attachInfo),
|
||||
commentGroupAlbumMedia: (groupId, albumId, lloc, content) => bridge.apis.groupAlbum.comment(groupId, albumId, lloc, content),
|
||||
deleteGroupAlbumMedia: (groupId, albumId, lloc) => bridge.apis.groupAlbum.delete(groupId, albumId, lloc),
|
||||
likeGroupAlbumMedia: (groupId, albumId, batchId, lloc, isLike) => bridge.apis.groupAlbum.like(groupId, albumId, batchId, lloc, isLike),
|
||||
sendGroupNotice: (groupId, content, options) => bridge.sendGroupNotice(groupId, content, options),
|
||||
getGroupNotice: (groupId) => bridge.getGroupNotice(groupId),
|
||||
deleteGroupNotice: (groupId, fid) => bridge.deleteGroupNotice(groupId, fid),
|
||||
|
||||
Reference in new issue
Block a user