chore: 调整字段名
- 将问题类型的类型名字段命名由type改为name
This commit is contained in:
@ -14,15 +14,15 @@ export function toQuestionTypeView(
|
||||
): QuestionTypeView {
|
||||
if (typeof raw === 'string' || raw === null) {
|
||||
return {
|
||||
id: '',
|
||||
type: '',
|
||||
id: '-1',
|
||||
name: '',
|
||||
} satisfies QuestionTypeView;
|
||||
}
|
||||
const trans = raw.translations?.[0];
|
||||
|
||||
return {
|
||||
id: raw.id.toString(),
|
||||
type: trans?.name ?? '',
|
||||
name: trans?.name ?? '',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user