MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getDb

Function getDb

codex_image/codex_image.ts:54–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54async function getStoredToken(): Promise<string> {
55 const db = await getDb();
56 return (db.data?.accessToken || "").trim();
57}
58
59async function setStoredToken(token: string): Promise<void> {
60 const db = await getDb();
61 db.data!.accessToken = token.trim();
62 await db.write();
63}
64
65function maskToken(token: string): string {
66 if (!token) return "(未配置)";

Callers 2

getStoredTokenFunction · 0.70
setStoredTokenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected