small naming improvments

This commit is contained in:
counterweight 2025-02-13 00:13:56 +01:00
parent 3b71faa3e7
commit 3327b6a1ee
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 6 additions and 9 deletions

View file

@ -7,7 +7,7 @@ source "$(dirname "$0")/../.env"
UUID=$(uuidgen)
# Create a fake inviter_npub (using a random string here)
INVITER_NPUB="fake_inviter_${RANDOM}"
INVITER_PUB_KEY="fake_inviter_${RANDOM}"
# Get the current timestamp for created_at
CREATED_AT=$(date +"%Y-%m-%d %H:%M:%S")
@ -18,13 +18,13 @@ POSTGRES_CONTAINER_NAME=$(docker compose ps -q postgres | xargs docker inspect -
# Connect to the Postgres container and insert the fake record into the app_invite table
docker exec -i "$POSTGRES_CONTAINER_NAME" psql -v -U "$POSTGRES_USER" -d "$POSTGRES_DB" -h localhost -p 5432 -c "
INSERT INTO app_invite_created (uuid, inviter_npub, created_at)
VALUES ('$UUID', '$INVITER_NPUB', '$CREATED_AT')
VALUES ('$UUID', '$INVITER_PUB_KEY', '$CREATED_AT')
RETURNING *;
"
# Print the generated values
echo "Inserted app_invite_created Record:"
echo "UUID: $UUID"
echo "Inviter Npub: $INVITER_NPUB"
echo "Inviter Npub: $INVITER_PUB_KEY"
echo "Created At: $CREATED_AT"
echo "Try it at http://localhost/invite/$UUID"