wip #6140
This commit is contained in:
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
@ -36,5 +36,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await activeUsersChart.getChart(ps.span as any, ps.limit!, ps.offset!);
|
||||
return await activeUsersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
@ -36,5 +36,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await driveChart.getChart(ps.span as any, ps.limit!, ps.offset!);
|
||||
return await driveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
@ -36,5 +36,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await federationChart.getChart(ps.span as any, ps.limit!, ps.offset!);
|
||||
return await federationChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
|
||||
tag: {
|
||||
@ -43,5 +43,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await hashtagChart.getChart(ps.span as any, ps.limit!, ps.offset!, ps.tag);
|
||||
return await hashtagChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.tag);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
|
||||
host: {
|
||||
@ -44,5 +44,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await instanceChart.getChart(ps.span as any, ps.limit!, ps.offset!, ps.host);
|
||||
return await instanceChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.host);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
@ -36,5 +36,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await networkChart.getChart(ps.span as any, ps.limit!, ps.offset!);
|
||||
return await networkChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
@ -36,5 +36,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await notesChart.getChart(ps.span as any, ps.limit!, ps.offset!);
|
||||
return await notesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||
});
|
||||
|
@ -28,8 +28,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
|
||||
userId: {
|
||||
@ -45,5 +45,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserDriveChart.getChart(ps.span as any, ps.limit!, ps.offset!, ps.userId);
|
||||
return await perUserDriveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||
});
|
||||
|
@ -28,8 +28,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
|
||||
userId: {
|
||||
@ -45,5 +45,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserFollowingChart.getChart(ps.span as any, ps.limit!, ps.offset!, ps.userId);
|
||||
return await perUserFollowingChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||
});
|
||||
|
@ -28,8 +28,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
|
||||
userId: {
|
||||
@ -45,5 +45,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserNotesChart.getChart(ps.span as any, ps.limit!, ps.offset!, ps.userId);
|
||||
return await perUserNotesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||
});
|
||||
|
@ -28,8 +28,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
|
||||
userId: {
|
||||
@ -45,5 +45,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserReactionsChart.getChart(ps.span as any, ps.limit!, ps.offset!, ps.userId);
|
||||
return await perUserReactionsChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||
});
|
||||
|
@ -27,8 +27,8 @@ export const meta = {
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num,
|
||||
default: 0,
|
||||
validator: $.optional.nullable.num,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
@ -36,5 +36,5 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
return await usersChart.getChart(ps.span as any, ps.limit!, ps.offset!);
|
||||
return await usersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||
});
|
||||
|
@ -60,9 +60,9 @@ export default define(meta, async () => {
|
||||
Notes.count({ where: { userHost: null }, cache: 3600000 }),
|
||||
Users.count({ cache: 3600000 }),
|
||||
Users.count({ where: { host: null }, cache: 3600000 }),
|
||||
federationChart.getChart('hour', 1, 0).then(chart => chart.instance.total[0]),
|
||||
driveChart.getChart('hour', 1, 0).then(chart => chart.local.totalSize[0]),
|
||||
driveChart.getChart('hour', 1, 0).then(chart => chart.remote.totalSize[0]),
|
||||
federationChart.getChart('hour', 1, null).then(chart => chart.instance.total[0]),
|
||||
driveChart.getChart('hour', 1, null).then(chart => chart.local.totalSize[0]),
|
||||
driveChart.getChart('hour', 1, null).then(chart => chart.remote.totalSize[0]),
|
||||
]);
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user