mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-27 02:21:30 +01:00
Added timestamp to stored json that did not contain it
This will allow cached data to include the time it was refreshed at.
This commit is contained in:
parent
aca573e353
commit
54874175d8
@ -66,7 +66,11 @@ public interface JSONStorage extends SubSystem {
|
||||
public final long timestamp;
|
||||
|
||||
public StoredJSON(String json, long timestamp) {
|
||||
this.json = json;
|
||||
if (!json.startsWith("{\"") || json.contains("timestamp")) {
|
||||
this.json = json;
|
||||
} else {
|
||||
this.json = "{\"timestamp\": " + timestamp + ",\"" + json.substring(2);
|
||||
}
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user