add brief for functions in db, implemet full group manipulation (except owner,color), some fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user