Improve error handling of API (#4345)
* wip
* wip
* wip
* Update attached_notes.ts
* wip
* Refactor
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update call.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* ✌️
* Fix
This commit is contained in:
@@ -27,8 +27,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await activeUsersChart.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await activeUsersChart.getChart(ps.span as any, ps.limit);
|
||||
});
|
||||
|
@@ -27,8 +27,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await driveChart.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await driveChart.getChart(ps.span as any, ps.limit);
|
||||
});
|
||||
|
@@ -27,8 +27,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await federationChart.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await federationChart.getChart(ps.span as any, ps.limit);
|
||||
});
|
||||
|
@@ -34,8 +34,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await hashtagChart.getChart(ps.span as any, ps.limit, ps.tag);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await hashtagChart.getChart(ps.span as any, ps.limit, ps.tag);
|
||||
});
|
||||
|
@@ -35,8 +35,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await instanceChart.getChart(ps.span as any, ps.limit, ps.host);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await instanceChart.getChart(ps.span as any, ps.limit, ps.host);
|
||||
});
|
||||
|
@@ -27,8 +27,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await networkChart.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await networkChart.getChart(ps.span as any, ps.limit);
|
||||
});
|
||||
|
@@ -27,8 +27,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await notesChart.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await notesChart.getChart(ps.span as any, ps.limit);
|
||||
});
|
||||
|
@@ -37,8 +37,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await perUserDriveChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserDriveChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
});
|
||||
|
@@ -37,8 +37,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await perUserFollowingChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserFollowingChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
});
|
||||
|
@@ -37,8 +37,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await perUserNotesChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserNotesChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
});
|
||||
|
@@ -37,8 +37,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await perUserReactionsChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await perUserReactionsChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
});
|
||||
|
@@ -27,8 +27,6 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await usersChart.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
return await usersChart.getChart(ps.span as any, ps.limit);
|
||||
});
|
||||
|
Reference in New Issue
Block a user