Add Doris Schoolhouse and clean pending homelab changes
This commit is contained in:
21
home/doris-schoolhouse/bin/test-assignment-handoff.sh
Executable file
21
home/doris-schoolhouse/bin/test-assignment-handoff.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "usage: $0 <file> <class_name> [assignment_name]" >&2
|
||||
exit 1
|
||||
fi
|
||||
FILE="$1"
|
||||
CLASS_NAME="$2"
|
||||
ASSIGNMENT_NAME="${3:-Sample Assignment}"
|
||||
TARGET="${N8N_BASE_URL:-https://n8n.example.com}${SCHOOLHOUSE_N8N_ASSIGNMENT_WEBHOOK:-/webhook/school/intake/upload}"
|
||||
cat <<MSG
|
||||
Dry-run assignment handoff preview
|
||||
Target: $TARGET
|
||||
Command:
|
||||
curl -X POST "$TARGET" \\
|
||||
-F "document=@$FILE" \\
|
||||
-F "class_name=$CLASS_NAME" \\
|
||||
-F "assignment_name=$ASSIGNMENT_NAME" \\
|
||||
-F "submission_kind=assignment_turn_in" \\
|
||||
-F "source=doris-schoolhouse"
|
||||
MSG
|
||||
Reference in New Issue
Block a user