Add secure admin-key invitation endpoint

Adds a new invitation creation endpoint that requires a configured admin key before generating an invitation code. The controller now reads the expected key from configuration, returns 503 when it is missing, and rejects invalid attempts with 401. This also includes the request contract for the admin-key payload.
This commit is contained in:
Artemy
2026-10-04 16:38:57 +07:00
parent aee513ed38
commit 9aa7e017e2
3 changed files with 54 additions and 3 deletions
+5 -2
View File
@@ -164,11 +164,14 @@ if (migrateOnly)
return;
}
if (app.Environment.IsDevelopment())
/*if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
}*/
app.UseSwagger();
app.UseSwaggerUI();
//app.UseHttpsRedirection();