Skip to content

Commit

Permalink
refactor: Update getAJoke function to exclude offensive jokes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Sep 19, 2024
1 parent 6ec1b9b commit 91485b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ INSTALLATION_LOG_WITH_DATE="/data/coolify/source/installation-${DATE}.log"
exec > >(tee -a $INSTALLATION_LOG_WITH_DATE) 2>&1

getAJoke() {
JOKES=$(curl -s --max-time 2 https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
JOKES=$(curl -s --max-time 2 https://v2.jokeapi.dev/joke/Programming?blacklistFlags=nsfw,religious,political,racist,sexist,explicit&format=txt&type=single || true)
if [ "$JOKES" != "" ]; then
echo -e " - Until then, here's a joke for you:\n"
echo -e "$JOKES\n"
Expand Down

0 comments on commit 91485b5

Please sign in to comment.