Refactor API endpoints for consistency and clarity

- Updated route paths for hackathon submissions, notifications, registrations, and teams to include more descriptive actions (e.g., "update", "create", "delete").
- Removed deprecated routes and adjusted corresponding test cases to reflect new endpoint structures.
- Enhanced test scripts to ensure compatibility with updated API routes and improved error handling for OTP resend functionality.
- Adjusted server startup script for better Windows compatibility and streamlined process management.
This commit is contained in:
MythEclipse
2025-10-29 14:27:07 +07:00
parent 98c46611fb
commit 97c2fce7be
19 changed files with 361 additions and 155 deletions
+4 -4
View File
@@ -23,9 +23,9 @@ test_team_endpoints() {
local test_team_id=$(echo "$teams_response" | jq -r '.data[0].id // empty')
if [ -n "$test_team_id" ]; then
test_api_endpoint "GET Team By ID" "GET" "/v1/teams/admin/$test_team_id" 200 "" true
test_api_endpoint "GET Team By ID" "GET" "/v1/teams/admin/detail/$test_team_id" 200 "" true
test_api_endpoint "GET Team Members" "GET" "/v1/teams/admin/$test_team_id/members" 200 "" true
test_api_endpoint "GET Team By ID (Public)" "GET" "/v1/teams/$test_team_id" 200 "" true
test_api_endpoint "GET Team By ID (Public)" "GET" "/v1/teams/detail/$test_team_id" 200 "" true
test_api_endpoint "GET Team Members (Public)" "GET" "/v1/teams/$test_team_id/members" 200 "" true
fi
@@ -62,10 +62,10 @@ test_team_endpoints() {
user_id: $user_id,
role: "member"
}')
test_api_endpoint "POST Add Team Member" "POST" "/v1/teams/$created_team_id/members" 200 "$add_member_data" true
test_api_endpoint "POST Add Team Member" "POST" "/v1/teams/$created_team_id/members/create" 200 "$add_member_data" true
# Remove team member
test_api_endpoint "DELETE Remove Team Member" "DELETE" "/v1/teams/$created_team_id/members/$test_user_id" 200 "" true
test_api_endpoint "DELETE Remove Team Member" "DELETE" "/v1/teams/$created_team_id/members/delete/$test_user_id" 200 "" true
fi
# === Team Invitation Flow ===