From bc7452cd7f97b9ced7ef800c9df16d2bd6fe702d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 20 Feb 2026 00:29:26 +0100 Subject: [PATCH] quick fix and refactor --- .../Registration.API/Configuration/VbytesRelayOptions.cs | 4 ++-- .../Registration.API/appsettings.Development.json | 2 +- src/Registration/Registration.API/appsettings.json | 2 +- src/Web/lan-frontend/app/register/page.tsx | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Registration/Registration.API/Configuration/VbytesRelayOptions.cs b/src/Registration/Registration.API/Configuration/VbytesRelayOptions.cs index 28e457f..d94c4f2 100644 --- a/src/Registration/Registration.API/Configuration/VbytesRelayOptions.cs +++ b/src/Registration/Registration.API/Configuration/VbytesRelayOptions.cs @@ -3,9 +3,9 @@ namespace Registration.API.Configuration; public class VbytesRelayOptions { public string BaseUrl { get; set; } = string.Empty; - public string ParticipantRegisterPath { get; set; } = string.Empty; + public string ParticipantRegisterPath { get; set; } = "/api/participant"; public string ApiKeyHeaderName { get; set; } = "X-Api-Key"; public string ApiKey { get; set; } = string.Empty; public string ClientCertificatePfxPath { get; set; } = string.Empty; - public string VolunteerRegisterPath { get; set; } = "/api/volunteer/register"; + public string VolunteerRegisterPath { get; set; } = "/api/volunteer"; } diff --git a/src/Registration/Registration.API/appsettings.Development.json b/src/Registration/Registration.API/appsettings.Development.json index 43ad566..cf475e8 100644 --- a/src/Registration/Registration.API/appsettings.Development.json +++ b/src/Registration/Registration.API/appsettings.Development.json @@ -14,7 +14,7 @@ "VbytesRelay": { "BaseUrl": "https://api.lan.vbytes.se", "ParticipantRegisterPath": "/api/participant", - "VolunteerRegisterPath": "/api/volunteer/register", + "VolunteerRegisterPath": "/api/volunteer", "ApiKeyHeaderName": "X-Api-Key", "ApiKey": "", "ClientCertificatePfxPath": "" diff --git a/src/Registration/Registration.API/appsettings.json b/src/Registration/Registration.API/appsettings.json index d3ae39b..8d47bd1 100644 --- a/src/Registration/Registration.API/appsettings.json +++ b/src/Registration/Registration.API/appsettings.json @@ -11,7 +11,7 @@ "VbytesRelay": { "BaseUrl": "https://api.lan.vbytes.se", "ParticipantRegisterPath": "/api/participant", - "VolunteerRegisterPath": "/api/volunteer/register", + "VolunteerRegisterPath": "/api/volunteer", "ApiKeyHeaderName": "X-Api-Key", "ApiKey": "__SET_IN_USER_SECRETS__", "ClientCertificatePfxPath": "__SET_IN_USER_SECRETS__" diff --git a/src/Web/lan-frontend/app/register/page.tsx b/src/Web/lan-frontend/app/register/page.tsx index 9d295da..41a666c 100644 --- a/src/Web/lan-frontend/app/register/page.tsx +++ b/src/Web/lan-frontend/app/register/page.tsx @@ -3,7 +3,6 @@ import { useEffect, useState } from "react"; import Link from "next/link"; -import { useRouter } from "next/navigation"; interface EventContent { registrationEnabled: boolean; @@ -12,7 +11,6 @@ interface EventContent { } export default function RegisterPage() { - const router = useRouter(); const [content, setContent] = useState(null); const [formData, setFormData] = useState({ firstName: "", @@ -107,7 +105,7 @@ export default function RegisterPage() { }); if (response.ok) { - setMessage({ type: "success", text: "Registration complete! You are now registered for the LAN." }); + setMessage({ type: "success", text: "Registrering slutförd!" }); await fetch(`/api/Registration/register/${formData.ssn}`, { method: "POST", @@ -129,7 +127,7 @@ export default function RegisterPage() {
- ← Back to Information + ← Tillbaka till startsidan