From c711bf02c92b8a29c3e1191cbb71f41366a6cfaf Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 29 Oct 2026 12:59:28 +0100 Subject: [PATCH] Admin api logging fixes, admin api test client publishing tools --- .../SpacebarAuthenticationService.cs | 12 +++++++++- .../Models/Spacebar.Models.AdminApi/Rights.cs | 2 +- ...ldMEmberEvents.cs => GuildMemberEvents.cs} | 0 .../Pages/Home.razor | 15 ++++++++++++ .../Spacebar.AdminApi.TestClient/Program.cs | 3 +++ .../Spacebar.AdminApi.TestClient.csproj | 6 +++-- .../scripts/deploy.sh | 24 +++++++++++++++++++ 7 files changed, 58 insertions(+), 4 deletions(-) rename extra/admin-api/Models/Spacebar.Models.Gateway/{GuildMEmberEvents.cs => GuildMemberEvents.cs} (100%) create mode 100755 extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/scripts/deploy.sh diff --git a/extra/admin-api/Interop/Spacebar.Interop.Authentication/SpacebarAuthenticationService.cs b/extra/admin-api/Interop/Spacebar.Interop.Authentication/SpacebarAuthenticationService.cs index 9c00df53c..0e24661c4 100644 --- a/extra/admin-api/Interop/Spacebar.Interop.Authentication/SpacebarAuthenticationService.cs +++ b/extra/admin-api/Interop/Spacebar.Interop.Authentication/SpacebarAuthenticationService.cs @@ -32,11 +32,21 @@ public class SpacebarAuthenticationService(ILoggerHome +Spacebar instance: + +
Spacebar API URL: { builder.Services.AddSingleton(); builder.Services.AddSingleton(sp => (WebAssemblyJSRuntime)sp.GetRequiredService()); builder.Services.AddSingleton(sp => (IJSInProcessRuntime)sp.GetRequiredService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(); await builder.Build().RunAsync(); \ No newline at end of file diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj index 7b588facc..63d8f618b 100644 --- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj +++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj @@ -10,11 +10,12 @@ true false + false false - + false true - + @@ -44,6 +45,7 @@ + diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/scripts/deploy.sh b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/scripts/deploy.sh new file mode 100755 index 000000000..d7563b2dd --- /dev/null +++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/scripts/deploy.sh @@ -0,0 +1,24 @@ +#!/bin/sh +if [[ -z $(git status -s) ]] +then + echo "tree is clean" +else + echo "tree is dirty, please commit changes before running this" +# exit +fi + +REMOTE_TARGET=`cat .publish_target` +if [[ -n "$REMOTE_TARGET" ]] +then + echo "Publish target is ${REMOTE_TARGET}" +else + echo "Publish target not set. Please write it in .publish_target (rsync path specifier)" + exit +fi + +BASE_DIR=`pwd` +set -x +rm -rf bin/Release +dotnet publish -c Release +dotnet restore # restore debug deps +rsync --delete -raP bin/Release/net10.0/publish/wwwroot/ ${REMOTE_TARGET}