优化训练计划列表接口返回结构,将数据包装为对象形式,包含列表、总数、页码和限制信息。
This commit is contained in:
@@ -66,7 +66,8 @@ export class TrainingPlansService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
data: rows.map(r => ({
|
data: {
|
||||||
|
list: rows.map(r => ({
|
||||||
id: r.id,
|
id: r.id,
|
||||||
createdAt: r.createdAt,
|
createdAt: r.createdAt,
|
||||||
startDate: r.startDate,
|
startDate: r.startDate,
|
||||||
@@ -75,6 +76,7 @@ export class TrainingPlansService {
|
|||||||
total: count,
|
total: count,
|
||||||
page,
|
page,
|
||||||
limit,
|
limit,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user