Refactor Bridge APIs, slim Bridge and reorder imports
Move and standardize API implementations under bridge/apis, slim down the Bridge class (remove inline action implementations, caches and large comment blocks) and relocate related types/exports. Clean up and reorder imports across many bridge/api modules, normalize constructors, add logger imports where needed, and adjust WebUI routing/import ordering. These changes centralize API logic, reduce Bridge surface area, and tidy module boundaries and imports.
This commit is contained in:
1 parent
a52a9724cb
commit
a49e507e15
22 files changed
+144
-452
No files matched your search
@@ -1,10 +1,3 @@
|
||||
// GroupAlbumApi — group photo album operations (list/upload/comment/
|
||||
// like/delete + media listing). Inlined from `actions/group-album.ts`
|
||||
// and `web-actions/group-album.ts` (both deleted alongside actions/*
|
||||
// in commit 13). The pure-HTTP helpers in `web/group-album.ts` stay
|
||||
// where they are — they're transport-layer code, not Bridge actions.
|
||||
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type {
|
||||
DeleteMediasRequest,
|
||||
DeleteMediasResponse,
|
||||
@@ -15,9 +8,10 @@ import type {
|
||||
GetMediaListRequest,
|
||||
GetMediaListResponse,
|
||||
} from '@snowluma/proto-defs/oidb-actions/group-album';
|
||||
import type { BridgeContext } from '../bridge-context';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { getGroupAlbumList, uploadImageToGroupAlbum } from '@snowluma/protocol/web/group-album';
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import type { BridgeContext } from '../bridge-context';
|
||||
// `getCookies` is part of WebApi — go through the hub so we don't
|
||||
// duplicate the cookie acquisition flow.
|
||||
|
||||
@@ -51,7 +45,7 @@ function convertBigIntToString(obj: any): any {
|
||||
}
|
||||
|
||||
export class GroupAlbumApi {
|
||||
constructor(private readonly ctx: BridgeContext) {}
|
||||
constructor(private readonly ctx: BridgeContext) { }
|
||||
|
||||
/** List a group's albums (HTTP-cookie-based, qzone.qq.com). */
|
||||
async list(groupId: number): Promise<any> {
|
||||
|
||||
Reference in new issue
Block a user