PDS Admin tool make it easier to moderate your PDS with labels

fix: rework typing

andresitorresm.com aff0334e 99287e17

verified
+5 -5
+1 -1
README.md
··· 13 13 - PDSs settings 14 14 - Can set the watch for multiple PDSs 15 15 - An array of email addresses to send the notifications to 16 + - An optional webhook URL to send notifications to 16 17 - On startup should it query your PDS to find all the active accounts and add them to the watch list 17 18 - Should it subscribe to your PDS to auto pick up new accounts (cursor resume does not work for this since the startup backfill can usually handle most backfills) 18 19 - Admin password. __This is the keys to your PDS so please use this with caution. label watcher does not require this__. But it is needed for auto takedowns. ··· 25 26 26 27 - How to email the notifications. Either via Resend's API or a smtp url like the PDS supports 27 28 - Email address the email comes from 28 - - Webhook URL (optional) 29 29 - database location 30 30 - migrations folder 31 31 - logs level
+1 -1
src/handlers/handleNewLabel.ts
··· 148 148 break; 149 149 case "takedown": { 150 150 // Can be a successful takedown or not 151 - let takedownActionSucceededs: boolean = false; 151 + let takedownActionSucceededs: boolean | undefined; 152 152 153 153 if (pdsConfig.pdsAdminPassword) { 154 154 const rpc = new Client({
+2 -2
src/mailer.ts
··· 24 24 dateApplied: Date; 25 25 takeDown: boolean; 26 26 targetUri: string; 27 - takedownSuccess?: boolean; 27 + takedownSuccess?: boolean | undefined; 28 28 }): string => { 29 29 const { 30 30 did, ··· 84 84 dateApplied: Date; 85 85 takeDown: boolean; 86 86 targetUri: string; 87 - takedownSuccess?: boolean; 87 + takedownSuccess?: boolean | undefined; 88 88 }, 89 89 ) => { 90 90 const {
+1 -1
src/webhook.ts
··· 12 12 dateApplied: Date; 13 13 takeDown: boolean; 14 14 targetUri: string; 15 - takedownSuccess?: boolean; 15 + takedownSuccess?: boolean | undefined; 16 16 }, 17 17 ) => { 18 18 const text = getInfoFromParams(params);