mirror of
https://git.recroomarchive.org/RecRoomArchive/RRAC.git
synced 2026-09-08 22:51:26 -07:00
More changes...
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Xml.Linq;
|
||||
using RecRoomArchive.Models.RRA;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace RecRoomArchive.Services
|
||||
{
|
||||
@@ -9,7 +10,7 @@ namespace RecRoomArchive.Services
|
||||
string basePath = "data";
|
||||
|
||||
string[] directories = ["rooms", "images", "blobs"];
|
||||
string[] files = ["rooms.json", "avatar.json", "settings.json", "profile.json"];
|
||||
string[] files = ["rooms.json", "avatar.json", "settings.json", "profile.json", "avatarItems.json", "serverPreferences.json"];
|
||||
|
||||
Directory.CreateDirectory(basePath);
|
||||
|
||||
@@ -28,6 +29,17 @@ namespace RecRoomArchive.Services
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteServerPrefs(bool isComplete)
|
||||
{
|
||||
var preferences = new ServerPreferences
|
||||
{
|
||||
CompletedSetup = isComplete
|
||||
};
|
||||
|
||||
SetData("serverPreferences.json", JsonSerializer.Serialize(preferences));
|
||||
}
|
||||
|
||||
public string? GetData(string name)
|
||||
{
|
||||
var path = $"data/{name}";
|
||||
|
||||
Reference in New Issue
Block a user