mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
lint
This commit is contained in:
parent
0866960342
commit
950c67979a
1 changed files with 6 additions and 4 deletions
|
@ -761,7 +761,8 @@ const fetchPerUserFollowingChart = async (): Promise<typeof chartData> => {
|
||||||
const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => {
|
const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => {
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
return raw != null ? {
|
if (raw == null) return null;
|
||||||
|
return {
|
||||||
series: [{
|
series: [{
|
||||||
name: 'Local',
|
name: 'Local',
|
||||||
type: 'area',
|
type: 'area',
|
||||||
|
@ -771,14 +772,15 @@ const fetchPerUserFollowingChart = async (): Promise<typeof chartData> => {
|
||||||
type: 'area',
|
type: 'area',
|
||||||
data: format(raw.remote.followings.total),
|
data: format(raw.remote.followings.total),
|
||||||
}],
|
}],
|
||||||
} : raw;
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
|
const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
|
||||||
const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => {
|
const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => {
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
return raw != null ? {
|
if (raw == null) return null;
|
||||||
|
return {
|
||||||
series: [{
|
series: [{
|
||||||
name: 'Local',
|
name: 'Local',
|
||||||
type: 'area',
|
type: 'area',
|
||||||
|
@ -788,7 +790,7 @@ const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
|
||||||
type: 'area',
|
type: 'area',
|
||||||
data: format(raw.remote.followers.total),
|
data: format(raw.remote.followers.total),
|
||||||
}],
|
}],
|
||||||
} : raw;
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPerUserDriveChart = async (): Promise<typeof chartData> => {
|
const fetchPerUserDriveChart = async (): Promise<typeof chartData> => {
|
||||||
|
|
Loading…
Reference in a new issue