feat(account): add deletion lifecycle
This commit is contained in:
@@ -12,6 +12,7 @@ namespace JobTrackerApi.Services
|
||||
public string CvArtifactsRoot { get; }
|
||||
public string CvExportsRoot { get; }
|
||||
public string CvBenchmarksRoot { get; }
|
||||
public string AccountDeletionTombstonesRoot { get; }
|
||||
|
||||
public AppPaths(IConfiguration cfg, IHostEnvironment env)
|
||||
{
|
||||
@@ -49,6 +50,12 @@ namespace JobTrackerApi.Services
|
||||
|
||||
Directory.CreateDirectory(cvBenchmarksRoot);
|
||||
CvBenchmarksRoot = cvBenchmarksRoot;
|
||||
|
||||
var tombstonesRoot = (cfg["AccountLifecycle:TombstonesRoot"] ?? "").Trim();
|
||||
if (string.IsNullOrWhiteSpace(tombstonesRoot)) tombstonesRoot = Path.Combine(DataRoot, "DeletionTombstones");
|
||||
if (!Path.IsPathRooted(tombstonesRoot)) tombstonesRoot = Path.Combine(env.ContentRootPath, tombstonesRoot);
|
||||
Directory.CreateDirectory(tombstonesRoot);
|
||||
AccountDeletionTombstonesRoot = tombstonesRoot;
|
||||
}
|
||||
|
||||
public string GetDbPath(string fileName = "jobtracker.db") => Path.Combine(DataRoot, fileName);
|
||||
@@ -71,6 +78,9 @@ namespace JobTrackerApi.Services
|
||||
|
||||
public string GetOwnerDailyExportsRoot(string? configuredFolder, string ownerUserId) =>
|
||||
Path.Combine(GetExportsRoot(configuredFolder), GetOwnerStorageKey(ownerUserId));
|
||||
|
||||
public string GetOwnerAccountExportsRoot(string ownerUserId) =>
|
||||
Path.Combine(DataRoot, "AccountExports", GetOwnerStorageKey(ownerUserId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user