this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add new constants

+5 -3
+2
src/constants.ts
··· 2 2 3 3 export const DID = process.env.DID ?? ""; 4 4 export const SIGNING_KEY = process.env.SIGNING_KEY ?? ""; 5 + export const PORT = 4001; 6 + export const LABEL_LIMIT = 4; 5 7 export const POSTS: Record<string, string> = { 6 8 "3kwsqucto3j2a": "delete", 7 9 "3kwss4ldkwd2j": "they",
+3 -3
src/label.ts
··· 1 1 import { AppBskyActorDefs, ComAtprotoLabelDefs } from "@atproto/api"; 2 - import { DID, POSTS, SIGNING_KEY } from "./constants.js"; 2 + import { DID, PORT, LABEL_LIMIT, POSTS, SIGNING_KEY } from "./constants.js"; 3 3 import { LabelerServer } from "@skyware/labeler"; 4 4 5 5 const server = new LabelerServer({ did: DID, signingKey: SIGNING_KEY }); 6 6 7 - server.start(4001, (error, address) => { 7 + server.start(PORT, (error, address) => { 8 8 if (error) { 9 9 console.error(error); 10 10 } else { ··· 38 38 console.log(err); 39 39 }) 40 40 .then(() => console.log(`Deleted labels for ${did}`)); 41 - } else if (labels.size < 4 && POSTS[uri]) { 41 + } else if (labels.size < LABEL_LIMIT && POSTS[uri]) { 42 42 await server 43 43 .createLabel({ uri: did, val: POSTS[uri] }) 44 44 .catch((err) => {