this repo has no description
atproto bluesky typescript express

zed formatting

+4 -20
+4 -20
src/lib/theme.ts
··· 38 38 } 39 39 } 40 40 41 - export async function getBackgroundBase64( 42 - agent: AtpAgent, 43 - did: string, 44 - cid: string, 45 - ) { 41 + export async function getBackgroundBase64(agent: AtpAgent, did: string, cid: string) { 46 42 const blob = await getBackground(agent, did, cid); 47 43 const mimetype = blob.headers["content-type"] ?? "application/octet-stream"; 48 44 const base64 = Buffer.from(blob.data).toString("base64"); ··· 64 60 return { theme, bg }; 65 61 } 66 62 67 - export async function putTheme( 68 - agent: AtpAgent, 69 - did: string, 70 - theme: any, 71 - bg?: any, 72 - ) { 73 - const { 74 - bg_color, 75 - text_color, 76 - link_color, 77 - side_color, 78 - side_border, 79 - repeat = false, 80 - } = theme; 63 + export async function putTheme(agent: AtpAgent, did: string, theme: any, bg?: any) { 64 + const { bg_color, text_color, link_color, side_color, side_border, repeat = false } = theme; 81 65 const bgBuffer = Buffer.from(bg, "base64"); 82 66 let output = {}; 83 67 84 68 if (bg) { 85 - const blob = await agent.com.atproto.repo.uploadBlob(bgBuffer); 69 + const blob = await agent.uploadBlob(bgBuffer); 86 70 87 71 output = { 88 72 $type: "lol.skittr.actor.theme",