Account region

This commit is contained in:
2025-09-07 01:55:34 +08:00
parent d2f5ba36ab
commit 4a27794ccc
9 changed files with 2091 additions and 9 deletions

View File

@@ -52,6 +52,7 @@ public class AccountCurrentController(
{
[MaxLength(256)] public string? Nick { get; set; }
[MaxLength(32)] public string? Language { get; set; }
[MaxLength(32)] public string? Region { get; set; }
}
[HttpPatch]
@@ -63,6 +64,7 @@ public class AccountCurrentController(
if (request.Nick is not null) account.Nick = request.Nick;
if (request.Language is not null) account.Language = request.Language;
if (request.Region is not null) account.Region = request.Region;
await db.SaveChangesAsync();
await accounts.PurgeAccountCache(currentUser);