Update baserom, add creation timestamp to seed fetch results

This commit is contained in:
2025-09-05 21:12:10 -05:00
parent 06afab3a10
commit 7dd8e3c217
4 changed files with 59 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
namespace ALttPRandomizer.Service {
using global::Azure;
using ALttPRandomizer.Azure;
using ALttPRandomizer.Model;
using Microsoft.Extensions.Logging;
@@ -49,6 +50,13 @@
}
result["patch"] = Convert.ToBase64String(patchData.ToArray());
try {
var creationTime = await this.AzureStorage.GetFileCreation($"{seedId}/patch.bps");
result["created"] = creationTime.ToUnixTimeSeconds();
} catch (RequestFailedException e) {
this.Logger.LogError(e, "Failed to get creation timestamp for seed {seedId}", seedId);
}
if (files.TryGetValue("meta.json", out var metaData)) {
var json = JsonDocument.Parse(metaData.ToString());
result["meta"] = json;