From bb8d5dcf1273b9517e912259841747b638d4a2d1 Mon Sep 17 00:00:00 2001 From: spiral Date: Sat, 30 Oct 2021 20:45:59 -0400 Subject: [PATCH] fix: actually export everything from PKSystem --- PluralKit.Core/Services/DataFileService.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/PluralKit.Core/Services/DataFileService.cs b/PluralKit.Core/Services/DataFileService.cs index b0c2e721..63ad91b6 100644 --- a/PluralKit.Core/Services/DataFileService.cs +++ b/PluralKit.Core/Services/DataFileService.cs @@ -31,15 +31,11 @@ namespace PluralKit.Core await using var conn = await _db.Obtain(); var o = new JObject(); - o.Add("version", 1); - o.Add("id", system.Hid); - o.Add("name", system.Name); - o.Add("description", system.Description); - o.Add("tag", system.Tag); - o.Add("avatar_url", system.AvatarUrl); + + o.Merge(system.ToJson(LookupContext.ByOwner)); + o.Add("timezone", system.UiTz); - o.Add("created", system.Created.FormatExport()); o.Add("accounts", new JArray((await _repo.GetSystemAccounts(system.Id)).ToList())); o.Add("members", new JArray((await _repo.GetSystemMembers(system.Id).ToListAsync()).Select(m => m.ToJson(LookupContext.ByOwner))));