mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
fix: bind assignments to authenticated player
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user