refactor: rename /api/preview-whitelist to /api/preview/whitelist

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Oliver Kieselbach
2026-03-01 16:50:18 +01:00
parent a2de05fe33
commit 0d2f2ae38c
3 changed files with 8 additions and 8 deletions
@@ -36,13 +36,13 @@ public class PreviewWhitelistFunction
}
/// <summary>
/// GET /api/preview-whitelist
/// GET /api/preview/whitelist
/// Returns all approved tenants.
/// </summary>
[Function("GetPreviewWhitelist")]
[Authorize]
public async Task<HttpResponseData> GetAll(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "preview-whitelist")] HttpRequestData req,
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "preview/whitelist")] HttpRequestData req,
FunctionContext context)
{
var principal = context.GetUser();
@@ -65,13 +65,13 @@ public class PreviewWhitelistFunction
}
/// <summary>
/// POST /api/preview-whitelist/{tenantId}
/// POST /api/preview/whitelist/{tenantId}
/// Approves a tenant for Private Preview.
/// </summary>
[Function("ApprovePreviewTenant")]
[Authorize]
public async Task<HttpResponseData> Approve(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "preview-whitelist/{tenantId}")] HttpRequestData req,
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "preview/whitelist/{tenantId}")] HttpRequestData req,
string tenantId,
FunctionContext context)
{
@@ -146,13 +146,13 @@ public class PreviewWhitelistFunction
}
/// <summary>
/// DELETE /api/preview-whitelist/{tenantId}
/// DELETE /api/preview/whitelist/{tenantId}
/// Revokes a tenant's Private Preview access.
/// </summary>
[Function("RevokePreviewTenant")]
[Authorize]
public async Task<HttpResponseData> Revoke(
[HttpTrigger(AuthorizationLevel.Anonymous, "delete", Route = "preview-whitelist/{tenantId}")] HttpRequestData req,
[HttpTrigger(AuthorizationLevel.Anonymous, "delete", Route = "preview/whitelist/{tenantId}")] HttpRequestData req,
string tenantId,
FunctionContext context)
{
@@ -185,7 +185,7 @@ export function TenantManagementSection({
const isCurrentlyApproved = previewApproved.has(tenantId);
const response = await fetch(`${API_BASE_URL}/api/preview-whitelist/${tenantId}`, {
const response = await fetch(`${API_BASE_URL}/api/preview/whitelist/${tenantId}`, {
method: isCurrentlyApproved ? "DELETE" : "POST",
headers: { 'Authorization': `Bearer ${token}` }
});
@@ -128,7 +128,7 @@ export default function AdminConfigurationPage() {
fetch(`${API_BASE_URL}/api/config/all`, {
headers: { 'Authorization': `Bearer ${token}` }
}),
fetch(`${API_BASE_URL}/api/preview-whitelist`, {
fetch(`${API_BASE_URL}/api/preview/whitelist`, {
headers: { 'Authorization': `Bearer ${token}` }
})
]);