unoffical wafrn mirror
wafrn.net
atproto
social-network
activitypub
1#!/bin/bash
2
3# Use this to add an invite code to the bluesky integration
4
5SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
6
7source "${SCRIPT_DIR}/../../.env"
8
9NEW_CODE=$(docker exec wafrn-pds-1 wget -q -O - --header "Content-Type: application/json" --post-data '{"useCount":999999}' http://admin:${PDS_ADMIN_PASSWORD}@localhost:3000/xrpc/com.atproto.server.createInviteCode | jq --raw-output '.code')
10
11echo Adding code ${NEW_CODE}
12
13docker exec -i wafrn-db-1 psql -d ${POSTGRES_DBNAME} -c "INSERT INTO \"bskyInviteCodes\" (code,\"masterCode\") VALUES ('${NEW_CODE}',true);"