quick fix and refactor
This commit is contained in:
parent
7f603324f8
commit
bc7452cd7f
4 changed files with 6 additions and 8 deletions
|
|
@ -3,9 +3,9 @@ namespace Registration.API.Configuration;
|
||||||
public class VbytesRelayOptions
|
public class VbytesRelayOptions
|
||||||
{
|
{
|
||||||
public string BaseUrl { get; set; } = string.Empty;
|
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 ApiKeyHeaderName { get; set; } = "X-Api-Key";
|
||||||
public string ApiKey { get; set; } = string.Empty;
|
public string ApiKey { get; set; } = string.Empty;
|
||||||
public string ClientCertificatePfxPath { 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";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
"VbytesRelay": {
|
"VbytesRelay": {
|
||||||
"BaseUrl": "https://api.lan.vbytes.se",
|
"BaseUrl": "https://api.lan.vbytes.se",
|
||||||
"ParticipantRegisterPath": "/api/participant",
|
"ParticipantRegisterPath": "/api/participant",
|
||||||
"VolunteerRegisterPath": "/api/volunteer/register",
|
"VolunteerRegisterPath": "/api/volunteer",
|
||||||
"ApiKeyHeaderName": "X-Api-Key",
|
"ApiKeyHeaderName": "X-Api-Key",
|
||||||
"ApiKey": "",
|
"ApiKey": "",
|
||||||
"ClientCertificatePfxPath": ""
|
"ClientCertificatePfxPath": ""
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"VbytesRelay": {
|
"VbytesRelay": {
|
||||||
"BaseUrl": "https://api.lan.vbytes.se",
|
"BaseUrl": "https://api.lan.vbytes.se",
|
||||||
"ParticipantRegisterPath": "/api/participant",
|
"ParticipantRegisterPath": "/api/participant",
|
||||||
"VolunteerRegisterPath": "/api/volunteer/register",
|
"VolunteerRegisterPath": "/api/volunteer",
|
||||||
"ApiKeyHeaderName": "X-Api-Key",
|
"ApiKeyHeaderName": "X-Api-Key",
|
||||||
"ApiKey": "__SET_IN_USER_SECRETS__",
|
"ApiKey": "__SET_IN_USER_SECRETS__",
|
||||||
"ClientCertificatePfxPath": "__SET_IN_USER_SECRETS__"
|
"ClientCertificatePfxPath": "__SET_IN_USER_SECRETS__"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
interface EventContent {
|
interface EventContent {
|
||||||
registrationEnabled: boolean;
|
registrationEnabled: boolean;
|
||||||
|
|
@ -12,7 +11,6 @@ interface EventContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function RegisterPage() {
|
export default function RegisterPage() {
|
||||||
const router = useRouter();
|
|
||||||
const [content, setContent] = useState<EventContent | null>(null);
|
const [content, setContent] = useState<EventContent | null>(null);
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
firstName: "",
|
firstName: "",
|
||||||
|
|
@ -107,7 +105,7 @@ export default function RegisterPage() {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.ok) {
|
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}`, {
|
await fetch(`/api/Registration/register/${formData.ssn}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
@ -129,7 +127,7 @@ export default function RegisterPage() {
|
||||||
<div className="max-w-2xl mx-auto bg-white p-8 rounded-xl shadow-md">
|
<div className="max-w-2xl mx-auto bg-white p-8 rounded-xl shadow-md">
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<Link href="/" className="text-blue-600 hover:text-blue-800 flex items-center gap-1 text-sm font-medium">
|
<Link href="/" className="text-blue-600 hover:text-blue-800 flex items-center gap-1 text-sm font-medium">
|
||||||
← Back to Information
|
← Tillbaka till startsidan
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-center mb-10">
|
<div className="text-center mb-10">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue