add brief for functions in db, implemet full group manipulation (except owner,color), some fixes

This commit is contained in:
2026-04-01 20:13:50 +02:00
parent 81d0d19064
commit b00eff5c47
9 changed files with 150 additions and 26 deletions
+5 -5
View File
@@ -15,7 +15,7 @@ if [[ -z "$TOKEN1" || -z "$TOKEN2" || -z "$GROUP_ID" ]]; then
fi
echo "=== Getting members of group $GROUP_ID as user1 (owner) ==="
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/groupmembers" \
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/group/members" \
-d "token=$TOKEN1" \
-d "group=$GROUP_ID")
BODY=$(echo "$RESP" | head -1)
@@ -29,7 +29,7 @@ fi
echo ""
echo "=== Getting members of group $GROUP_ID as user2 (member) ==="
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/groupmembers" \
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/group/members" \
-d "token=$TOKEN2" \
-d "group=$GROUP_ID")
BODY=$(echo "$RESP" | head -1)
@@ -43,7 +43,7 @@ fi
echo ""
echo "=== Getting members with invalid token ==="
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/groupmembers" \
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/group/members" \
-d "token=invalid_token" \
-d "group=$GROUP_ID")
BODY=$(echo "$RESP" | head -1)
@@ -57,7 +57,7 @@ fi
echo ""
echo "=== Getting members with invalid group ID ==="
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/groupmembers" \
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/group/members" \
-d "token=$TOKEN1" \
-d "group=abc")
BODY=$(echo "$RESP" | head -1)
@@ -71,7 +71,7 @@ fi
echo ""
echo "=== Getting members of non-existent group ==="
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/groupmembers" \
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/get/group/members" \
-d "token=$TOKEN1" \
-d "group=999999")
BODY=$(echo "$RESP" | head -1)