mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-21 07:24:21 +01:00
refactor(reports): rename variables and remove type assertion
This commit is contained in:
@@ -57,7 +57,7 @@ const reportsController: AppController = async (c) => {
|
||||
};
|
||||
|
||||
/** https://docs.joinmastodon.org/methods/admin/reports/#get */
|
||||
const viewAllReportsController: AppController = async (c) => {
|
||||
const adminReportsController: AppController = async (c) => {
|
||||
const store = c.get('store');
|
||||
const reports = await store.query([{ kinds: [1984], '#P': [Conf.pubkey] }])
|
||||
.then((events) => hydrateEvents({ storage: store, events: events, signal: c.req.raw.signal }))
|
||||
@@ -66,4 +66,4 @@ const viewAllReportsController: AppController = async (c) => {
|
||||
return c.json(reports);
|
||||
};
|
||||
|
||||
export { reportsController, viewAllReportsController };
|
||||
export { adminReportsController, reportsController };
|
||||
|
||||
Reference in New Issue
Block a user