feat: map objectives, SBC, squad battles, and match endpoints #5
Reference in New Issue
Block a user
Delete Branch "feat/map-objectives-sbc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds mapper coverage for several FIFA 23 FUT endpoints that were not yet handled, plus fixes a bug where prefix routes always returned
method: "GET"regardless of the matched EA method.New exact routes
GET /ut/game/fut/user/dynamicobjectivesGET /objectivesGET /ut/game/fut/sbs/challengesGET /sbc/sbs/not/sbc/POST /ut/game/fut/squadbattle/resultPOST /matches/resultPOST /ut/game/fut/game/rPOST /matches/resultGET /ut/game/fut/squads/userGET /squadNew prefix routes
GET /ut/game/fut/sbs/challenges/{id}GET /sbc/{id}POST /ut/game/fut/sbs/challenges/{id}/sets/{setId}/tradePOST /sbc/submitPOST /ut/game/fut/user/dynamicobjectives/{id}/milestones/{m}/claimPOST /objectives/{id}/claimBug fix
method: "GET"instead of using the matched route'sea_method. Fixed tomethod: r.ea_method.test_prefix_routes_preserve_methodtest to guard against regressions.Closes #3 #4
What still needs to be done before merging
Add response shapers in
src/shaper.rsfor the new endpoints:shape_objectives(core_resp)→ wrap in{ "challenges": ..., "version": 1 }shape_sbc_list(core_resp)→ wrap in{ "SBCSetSummary": { "challenges": ... } }shape_match_result(core_resp)→ wrap in{ "resultCode": 200, "userInfo": { "coins": ... } }Register shapers in
src/proxy.rsdispatch table.Add mapper unit tests for each new route:
Run
cargo testto confirm all existing tests still pass alongside the new ones.Run
cargo clippy -- -D warningsclean.Test plan
cargo testpasses (including the newtest_prefix_routes_preserve_method)openfut-bridge-replay captures/session_YYYYMMDD.jsonand confirm objectives/SBC requests now map to Core rather than falling through to the placeholdercargo clippy -- -D warningscleanAdds exact and prefix routes for endpoints observed in FIFA 23 FUT that were not yet covered: - GET /ut/game/fut/user/dynamicobjectives → GET /objectives - POST /ut/game/fut/user/dynamicobjectives/{id}/milestones/{m}/claim → POST /objectives/{id}/claim - GET /ut/game/fut/sbs/challenges[/{id}] → GET /sbc[/{id}] - POST /ut/game/fut/sbs/challenges/{id}/sets/{setId}/trade → POST /sbc/submit - POST /ut/game/fut/squadbattle/result → POST /matches/result - POST /ut/game/fut/game/r → POST /matches/result - GET /ut/game/fut/squads/user → GET /squad Also fixes prefix-route method forwarding bug: prefix routes were unconditionally returning method "GET" instead of the matched EA method. Closes #3 #4 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.