mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
include repository in server mods
This commit is contained in:
parent
54b66868fb
commit
98e174ac10
2 changed files with 3 additions and 0 deletions
|
@ -203,6 +203,7 @@ Result<ServerModMetadata> ServerModMetadata::parse(matjson::Value const& raw) {
|
||||||
root.needs("download_count").into(res.downloadCount);
|
root.needs("download_count").into(res.downloadCount);
|
||||||
root.has("about").into(res.about);
|
root.has("about").into(res.about);
|
||||||
root.has("changelog").into(res.changelog);
|
root.has("changelog").into(res.changelog);
|
||||||
|
root.has("repository").into(res.repository);
|
||||||
if (root.has("created_at")) {
|
if (root.has("created_at")) {
|
||||||
GEODE_UNWRAP_INTO(res.createdAt, ServerDateTime::parse(root.has("created_at").template get<std::string>()));
|
GEODE_UNWRAP_INTO(res.createdAt, ServerDateTime::parse(root.has("created_at").template get<std::string>()));
|
||||||
}
|
}
|
||||||
|
@ -226,6 +227,7 @@ Result<ServerModMetadata> ServerModMetadata::parse(matjson::Value const& raw) {
|
||||||
version.metadata.setDetails(res.about);
|
version.metadata.setDetails(res.about);
|
||||||
version.metadata.setChangelog(res.changelog);
|
version.metadata.setChangelog(res.changelog);
|
||||||
version.metadata.setDevelopers(developerNames);
|
version.metadata.setDevelopers(developerNames);
|
||||||
|
version.metadata.setRepository(res.repository);
|
||||||
res.versions.push_back(version);
|
res.versions.push_back(version);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace server {
|
||||||
std::unordered_set<std::string> tags;
|
std::unordered_set<std::string> tags;
|
||||||
std::optional<std::string> about;
|
std::optional<std::string> about;
|
||||||
std::optional<std::string> changelog;
|
std::optional<std::string> changelog;
|
||||||
|
std::optional<std::string> repository;
|
||||||
std::optional<ServerDateTime> createdAt;
|
std::optional<ServerDateTime> createdAt;
|
||||||
std::optional<ServerDateTime> updatedAt;
|
std::optional<ServerDateTime> updatedAt;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue