From d555fcaf172eae766fc22ae1e314f8b8f837facf Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 19 Aug 2025 21:34:27 +0800 Subject: [PATCH] :bug: Fix org publisher creation missing validation as well --- DysonNetwork.Sphere/Publisher/PublisherController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DysonNetwork.Sphere/Publisher/PublisherController.cs b/DysonNetwork.Sphere/Publisher/PublisherController.cs index 5cdbebd..1b1ebef 100644 --- a/DysonNetwork.Sphere/Publisher/PublisherController.cs +++ b/DysonNetwork.Sphere/Publisher/PublisherController.cs @@ -329,6 +329,8 @@ public class PublisherController( public async Task> CreatePublisherOrganization(string realmSlug, [FromBody] PublisherRequest request) { + if (string.IsNullOrEmpty(request.Name) || string.IsNullOrEmpty(request.Nick)) + return BadRequest("Name and Nick are required."); if (HttpContext.Items["CurrentUser"] is not Account currentUser) return Unauthorized(); var realm = await db.Realms.FirstOrDefaultAsync(r => r.Slug == realmSlug);