fix: bind assignments to authenticated player

This commit is contained in:
Josh Creek
2026-08-31 22:55:22 +01:00
parent 69f1ef6be1
commit 6b3db98327
4 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ func fetch_ranked_profile() -> Error:
func fetch_assignment(match_id: String) -> Error:
if match_id.is_empty():
if match_id.is_empty() or player_id.is_empty():
return ERR_INVALID_PARAMETER
return _start_request("assignment", HTTPClient.METHOD_GET, "/v1/assignments/" + match_id, {}, "")
@@ -236,7 +236,7 @@ func _on_request_completed(result: HTTPRequest.Result, response_code: int, _head
request_failed.emit(operation, response_code, ranked_profile.error_message)
return
elif operation == "assignment":
if not assignment.apply(payload):
if not assignment.apply(payload, player_id):
request_failed.emit(operation, response_code, assignment.error_message)
return
request_succeeded.emit(operation, payload)