Compare commits
2 Commits
18319b06b0
...
0a513d2350
Author | SHA1 | Date | |
---|---|---|---|
0a513d2350 | |||
057a287277 |
@ -66,8 +66,9 @@ export const signup = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let memberUuid;
|
||||||
try {
|
try {
|
||||||
await getJavaUuid(input.teamMember);
|
memberUuid = await getJavaUuid(input.teamMember);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
throw new ActionError({
|
throw new ActionError({
|
||||||
code: 'NOT_FOUND',
|
code: 'NOT_FOUND',
|
||||||
@ -85,6 +86,15 @@ export const signup = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (memberUuid) {
|
||||||
|
const blockedUser = await db.getBlockedUserByUuid({ uuid: memberUuid });
|
||||||
|
if (blockedUser) {
|
||||||
|
throw new ActionError({
|
||||||
|
code: 'FORBIDDEN',
|
||||||
|
message: 'Dein Mitspieler ist für die Registrierung gesperrt. Bitte suche dir einen anderen Mitspieler'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!teamDraft) {
|
if (!teamDraft) {
|
||||||
// check if a team with the same name already exists
|
// check if a team with the same name already exists
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { deleteTeam, type Team, teams } from '@app/admin/teams/teams.ts';
|
import { deleteTeam, editTeam, type Team, teams } from '@app/admin/teams/teams.ts';
|
||||||
import DataTable from '@components/admin/table/DataTable.svelte';
|
import DataTable from '@components/admin/table/DataTable.svelte';
|
||||||
import CrudPopup from '@components/admin/popup/CrudPopup.svelte';
|
import CrudPopup from '@components/admin/popup/CrudPopup.svelte';
|
||||||
import { confirmPopupState } from '@components/popup/ConfirmPopup.ts';
|
import { confirmPopupState } from '@components/popup/ConfirmPopup.ts';
|
||||||
@ -82,6 +82,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
]}
|
]}
|
||||||
onSubmit={deleteTeam}
|
onSubmit={editTeam}
|
||||||
bind:open={editPopupOpen}
|
bind:open={editPopupOpen}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user