Refactor ChainFormPage and challenge types to use 'taskIds' instead of 'tasks' for improved clarity and consistency in data handling.
This commit is contained in:
parent
44a7ac2bfd
commit
8b6e6b903a
@ -79,7 +79,7 @@ export const ChainFormPage: React.FC = () => {
|
|||||||
id,
|
id,
|
||||||
data: {
|
data: {
|
||||||
name: name.trim(),
|
name: name.trim(),
|
||||||
tasks: taskIds,
|
taskIds: taskIds,
|
||||||
},
|
},
|
||||||
}).unwrap()
|
}).unwrap()
|
||||||
toaster.create({
|
toaster.create({
|
||||||
@ -90,7 +90,7 @@ export const ChainFormPage: React.FC = () => {
|
|||||||
} else {
|
} else {
|
||||||
await createChain({
|
await createChain({
|
||||||
name: name.trim(),
|
name: name.trim(),
|
||||||
tasks: taskIds,
|
taskIds: taskIds,
|
||||||
}).unwrap()
|
}).unwrap()
|
||||||
toaster.create({
|
toaster.create({
|
||||||
title: t('challenge.admin.common.success'),
|
title: t('challenge.admin.common.success'),
|
||||||
|
|||||||
@ -131,11 +131,11 @@ export interface UpdateTaskRequest {
|
|||||||
|
|
||||||
export interface CreateChainRequest {
|
export interface CreateChainRequest {
|
||||||
name: string
|
name: string
|
||||||
tasks: string[] // Array of task IDs
|
taskIds: string[] // Array of task IDs
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateChainRequest {
|
export interface UpdateChainRequest {
|
||||||
name?: string
|
name?: string
|
||||||
tasks?: string[]
|
taskIds?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user