fix
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-03-31 02:21:40 -06:00
parent 3c721224c8
commit 85e1681017
9 changed files with 46 additions and 141 deletions

View File

@@ -157,14 +157,14 @@ export const Submission = {
html?: string
css?: string
js?: string
conversationId?: string
prompt?: string
},
) {
const { conversationId, ...rest } = code
const { prompt, ...rest } = code
const data = {
task_id: taskId,
...rest,
conversation_id: conversationId || null,
prompt: prompt || null,
}
const res = await http.post("/submission/", data)
return res.data
@@ -250,6 +250,15 @@ export const Prompt = {
)
).data
},
async getMessagesByUserTask(
taskId: number,
userId: number,
): Promise<PromptMessage[]> {
const convs = await this.listConversations(taskId, userId)
if (!convs.length) return []
return this.getMessages(convs[0].id)
},
}
export const Helper = {