Files
truenas-stacks/home/doris-schoolhouse/bin/test-recording-handoff.sh

20 lines
486 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if [ "$#" -lt 2 ]; then
echo "usage: $0 <file> <class_name>" >&2
exit 1
fi
FILE="$1"
CLASS_NAME="$2"
TARGET="${N8N_BASE_URL:-https://n8n.example.com}${SCHOOLHOUSE_N8N_RECORDING_WEBHOOK:-/webhook/class/upload}"
cat <<MSG
Dry-run recording handoff preview
Target: $TARGET
Command:
curl -X POST "$TARGET" \\
-F "data=@$FILE" \\
-F "class_name=$CLASS_NAME" \\
-F "lecture_title=${CLASS_NAME} Recording" \\
-F "source=doris-schoolhouse"
MSG