Add typecheck
This commit is contained in:
@@ -204,7 +204,7 @@ async function addUser() {
|
||||
label="Start?"
|
||||
:model-value="!!formData.cloned.value.start"
|
||||
@update:model-value="
|
||||
(newVal) =>
|
||||
(newVal: boolean) =>
|
||||
(formData.cloned.value!.start = newVal ? new Date() : null)
|
||||
"
|
||||
/>
|
||||
@@ -227,7 +227,7 @@ async function addUser() {
|
||||
label="End?"
|
||||
:model-value="!!formData.cloned.value.end"
|
||||
@update:model-value="
|
||||
(newVal) =>
|
||||
(newVal: boolean) =>
|
||||
(formData.cloned.value!.end = newVal ? new Date() : null)
|
||||
"
|
||||
/>
|
||||
|
||||
@@ -29,7 +29,13 @@ type Picture = {
|
||||
const { data, refresh, error } = await useFetch(`/api/hunt/${id}/diashow`, {
|
||||
transform: (input) => {
|
||||
if (!input || input.quests.length <= 0)
|
||||
return { id: 0, name: '', cols: [] as Picture[][], count: 0 };
|
||||
return {
|
||||
id: 0,
|
||||
name_de: '',
|
||||
name_en: '',
|
||||
cols: [] as Picture[][],
|
||||
count: 0
|
||||
};
|
||||
const { quests, ...rest } = input;
|
||||
const pictures: Picture[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user