Refactor group-album and remove eslint ignore

Remove an unused Bridge import, the asBridge helper and a stale comment from group-album, and relocate the GroupAlbumMediaResult and GroupAlbumCommentResult interfaces to the end of the file. In the sqlite package, remove the inline eslint-disable-next-line for @typescript-eslint/no-explicit-any near the BetterSqlite3 constructor. These edits clean up dead/stale code and re-enable the lint rule; there are no behavioral changes.
This commit is contained in:
手瓜一十雪 committed 2026-05-24 13:16:36 +08:00
1 parent afbec8ed44
commit acc5084647
2 files changed
+18 -53

No files matched your search

+12 -17
View File
@@ -10,25 +10,8 @@ import type {
} from '@snowluma/proto-defs/oidb-actions/group-album';
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.
function asBridge(ctx: BridgeContext): Bridge { return ctx as unknown as Bridge; }
export interface GroupAlbumMediaResult {
mediaList: any[];
nextAttachInfo: string;
}
export interface GroupAlbumCommentResult {
id: string;
user: { uin: string };
content: Array<{ type: number; content: string }>;
time: string;
clientKey: string;
}
function convertBigIntToString(obj: any): any {
if (obj === null || obj === undefined) return obj;
@@ -277,3 +260,15 @@ export class GroupAlbumApi {
return { success: true };
}
}
export interface GroupAlbumMediaResult {
mediaList: any[];
nextAttachInfo: string;
}
export interface GroupAlbumCommentResult {
id: string;
user: { uin: string };
content: Array<{ type: number; content: string }>;
time: string;
clientKey: string;
}