update api

This commit is contained in:
2026-08-03 01:18:17 +07:00
parent d9c5791c68
commit 92c72ba42f
6 changed files with 20 additions and 6 deletions
@@ -386,6 +386,7 @@ export type GetTeamStoryReq = {
export type GetTeamStoryRsp = {
error: string | undefined;
story: Story | undefined;
game: Game | undefined;
};
export type AddTeamActionReq = {
+13 -1
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { getAuthClient } from '@/api/auth_client';
import type { Place, Story } from '@/api/generated/crabs/evening_detective_server';
import type { Game, Place, Story } from '@/api/generated/crabs/evening_detective_server';
import HeaderMenu from '@/components/HeaderMenu.vue'
import { NCard, NFlex, NInput, NModal, NSpace, NText, NUpload, NUploadDragger, NAlert, NTag, NButton } from 'naive-ui'
import { useMessage } from 'naive-ui';
@@ -26,6 +26,16 @@ const story = ref<AdvancedStory>({
places: []
})
const game = ref<Game | undefined>({
id: undefined,
name: undefined,
description: undefined,
startAt: undefined,
status: undefined,
scenario: undefined,
teams: undefined
})
const code = ref('')
const isAtBottom = () => {
@@ -47,6 +57,8 @@ async function getStory() {
return
}
game.value = res.game
const wasAtBottom = isAtBottom();
if (wasAtBottom) {