|
|
|
|
@ -491,7 +491,7 @@ export async function listRegistrations(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* POST /competitions/{competition_id}/registrations/{registration_id}/approve
|
|
|
|
|
* POST /competitions/registrations/{registration_id}/approve
|
|
|
|
|
* Approve a registration
|
|
|
|
|
*/
|
|
|
|
|
export async function approveRegistration(
|
|
|
|
|
@ -499,11 +499,14 @@ export async function approveRegistration(
|
|
|
|
|
registrationId: number
|
|
|
|
|
): Promise<CompetitionApiResult<{ participant_id: number }>> {
|
|
|
|
|
try {
|
|
|
|
|
// Note: competitionId is kept for API consistency but not used in URL
|
|
|
|
|
void competitionId;
|
|
|
|
|
const response = await apiFetch(
|
|
|
|
|
`/competitions/${competitionId}/registrations/${registrationId}/approve`,
|
|
|
|
|
`/competitions/registrations/${registrationId}/approve`,
|
|
|
|
|
{
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: { 'Content-Type': 'application/json' },
|
|
|
|
|
body: JSON.stringify({}),
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@ -514,7 +517,7 @@ export async function approveRegistration(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* POST /competitions/{competition_id}/registrations/{registration_id}/reject
|
|
|
|
|
* POST /competitions/registrations/{registration_id}/reject
|
|
|
|
|
* Reject a registration
|
|
|
|
|
*/
|
|
|
|
|
export async function rejectRegistration(
|
|
|
|
|
@ -522,11 +525,14 @@ export async function rejectRegistration(
|
|
|
|
|
registrationId: number
|
|
|
|
|
): Promise<CompetitionApiResult<void>> {
|
|
|
|
|
try {
|
|
|
|
|
// Note: competitionId is kept for API consistency but not used in URL
|
|
|
|
|
void competitionId;
|
|
|
|
|
const response = await apiFetch(
|
|
|
|
|
`/competitions/${competitionId}/registrations/${registrationId}/reject`,
|
|
|
|
|
`/competitions/registrations/${registrationId}/reject`,
|
|
|
|
|
{
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: { 'Content-Type': 'application/json' },
|
|
|
|
|
body: JSON.stringify({}),
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|