From 98e174ac10e7ae4a3fde2ce895555ae95e6a14a8 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Mon, 25 Mar 2024 12:36:33 +0200 Subject: [PATCH] include repository in server mods --- loader/src/server/Server.cpp | 2 ++ loader/src/server/Server.hpp | 1 + 2 files changed, 3 insertions(+) diff --git a/loader/src/server/Server.cpp b/loader/src/server/Server.cpp index fda280eb..8489c8b1 100644 --- a/loader/src/server/Server.cpp +++ b/loader/src/server/Server.cpp @@ -203,6 +203,7 @@ Result ServerModMetadata::parse(matjson::Value const& raw) { root.needs("download_count").into(res.downloadCount); root.has("about").into(res.about); root.has("changelog").into(res.changelog); + root.has("repository").into(res.repository); if (root.has("created_at")) { GEODE_UNWRAP_INTO(res.createdAt, ServerDateTime::parse(root.has("created_at").template get())); } @@ -226,6 +227,7 @@ Result ServerModMetadata::parse(matjson::Value const& raw) { version.metadata.setDetails(res.about); version.metadata.setChangelog(res.changelog); version.metadata.setDevelopers(developerNames); + version.metadata.setRepository(res.repository); res.versions.push_back(version); } else { diff --git a/loader/src/server/Server.hpp b/loader/src/server/Server.hpp index 79e54580..62fb6efb 100644 --- a/loader/src/server/Server.hpp +++ b/loader/src/server/Server.hpp @@ -42,6 +42,7 @@ namespace server { std::unordered_set tags; std::optional about; std::optional changelog; + std::optional repository; std::optional createdAt; std::optional updatedAt;