mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat: import/export system config
This commit is contained in:
parent
9097142718
commit
cc4e659cec
6 changed files with 30 additions and 9 deletions
|
|
@ -21,7 +21,7 @@ public class DataFileService
|
|||
_dispatch = dispatch;
|
||||
}
|
||||
|
||||
public async Task<JObject> ExportSystem(PKSystem system, string timezone)
|
||||
public async Task<JObject> ExportSystem(PKSystem system)
|
||||
{
|
||||
await using var conn = await _db.Obtain();
|
||||
|
||||
|
|
@ -30,7 +30,9 @@ public class DataFileService
|
|||
|
||||
o.Merge(system.ToJson(LookupContext.ByOwner));
|
||||
|
||||
o.Add("timezone", timezone);
|
||||
var config = await _repo.GetSystemConfig(system.Id);
|
||||
o.Add("config", config.ToJson());
|
||||
|
||||
o.Add("accounts", new JArray((await _repo.GetSystemAccounts(system.Id)).ToList()));
|
||||
o.Add("members",
|
||||
new JArray((await _repo.GetSystemMembers(system.Id).ToListAsync()).Select(m =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue