Compare commits

..

3 commits

Author SHA1 Message Date
Kevin Schmidt
0b93ef4203
TD-50 Add Money to Matchdata
All checks were successful
Quality Check / Validate OAS (push) Successful in 37s
Quality Check / Validate OAS (pull_request) Successful in 37s
Quality Check / Testing (push) Successful in 1m16s
Quality Check / Linting (push) Successful in 1m19s
Quality Check / Static Analysis (push) Successful in 1m28s
Quality Check / Linting (pull_request) Successful in 1m9s
Quality Check / Static Analysis (pull_request) Successful in 1m13s
Quality Check / Testing (pull_request) Successful in 47s
2025-03-12 12:41:27 +01:00
033e6c1cf7
Merge pull request '[Fix]: Dead Code' (!11) from fix/old-placeholders into trunk
All checks were successful
Quality Check / Validate OAS (push) Successful in 32s
Quality Check / Linting (push) Successful in 58s
Quality Check / Testing (push) Successful in 1m0s
Quality Check / Static Analysis (push) Successful in 1m3s
Reviewed-on: #11
Reviewed-by: SZUT-Kevin <kevin.schmidt9101@gmail.com>
2025-03-12 10:07:04 +00:00
766d3c7d47
Fix: Stop it from starting by removing old Placeholders
All checks were successful
Quality Check / Validate OAS (push) Successful in 31s
Quality Check / Linting (push) Successful in 59s
Quality Check / Testing (push) Successful in 1m0s
Quality Check / Static Analysis (push) Successful in 1m4s
Quality Check / Validate OAS (pull_request) Successful in 31s
Quality Check / Linting (pull_request) Successful in 59s
Quality Check / Testing (pull_request) Successful in 1m0s
Quality Check / Static Analysis (pull_request) Successful in 1m3s
2025-03-12 09:53:57 +01:00
3 changed files with 0 additions and 69 deletions

View file

@ -1,27 +0,0 @@
package de.towerdefence.server.server.channels.match;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import de.towerdefence.server.server.JsonMessage;
import lombok.AllArgsConstructor;
import java.util.Map;
@AllArgsConstructor
public class TimeMessage extends JsonMessage {
private final long time;
private final String matchId;
@Override
protected String getMessageId() {
return "CurrentUnixTime";
}
@Override
protected Map<String, JsonNode> getData(JsonNodeFactory factory) {
return Map.of(
"time", factory.numberNode(this.time),
"matchId", factory.textNode(this.matchId)
);
}
}

View file

@ -1,17 +0,0 @@
#!/bin/sh
response=$(curl -s -X 'POST' \
'http://localhost:8080/api/v1/player/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "Player1",
"password": "1234"
}')
token=$(echo "$response" | jq -r .token)
payload='{"$id": "RequestConnectionToken", "channel": "time"}'
response=$(echo "$payload" | websocat ws://localhost:8080/ws/connection -H "Authorization: $token")
time_token=$(echo "$response" | jq -r .token)
websocat ws://localhost:8080/ws/time -H "Authorization: $time_token"

View file

@ -160,24 +160,6 @@ channels:
description: |
Channel for managing an active match
messages:
CurrentUnixTime:
description: The Current time in Unix Time
payload:
type: object
additionalProperties: false
properties:
$id:
type: string
format: messageId
time:
type: integer
format: int64
matchId:
type: string
required:
- $id
- time
- matchId
RequestTowerPlacing:
description: Requesting a placement of a tower
payload:
@ -310,13 +292,6 @@ operations:
$ref: "#/channels/matchmaking"
messages:
- $ref: "#/channels/matchmaking/messages/MatchEstablished"
matchUpdate:
title: MatchUpdate
action: receive
channel:
$ref: "#/channels/match"
messages:
- $ref: "#/channels/match/messages/CurrentUnixTime"
towerPlacing:
title: TowerPlacing
action: send