refactor: change 'singleAdminReportsController' to 'adminReportController'
This commit is contained in:
parent
17706d3b20
commit
53a8871a54
|
@ -44,7 +44,7 @@ import {
|
|||
} from '@/controllers/api/pleroma.ts';
|
||||
import { preferencesController } from '@/controllers/api/preferences.ts';
|
||||
import { relayController } from '@/controllers/nostr/relay.ts';
|
||||
import { adminReportsController, reportsController, singleAdminReportsController } from '@/controllers/api/reports.ts';
|
||||
import { adminReportController, adminReportsController, reportsController } from '@/controllers/api/reports.ts';
|
||||
import { searchController } from '@/controllers/api/search.ts';
|
||||
import {
|
||||
bookmarkController,
|
||||
|
@ -209,7 +209,7 @@ app.put('/api/v1/admin/ditto/relays', requireRole('admin'), adminSetRelaysContro
|
|||
|
||||
app.post('/api/v1/reports', requirePubkey, reportsController);
|
||||
app.get('/api/v1/admin/reports', requirePubkey, requireRole('admin'), adminReportsController);
|
||||
app.get('/api/v1/admin/reports/:id', requirePubkey, requireRole('admin'), singleAdminReportsController);
|
||||
app.get('/api/v1/admin/reports/:id', requirePubkey, requireRole('admin'), adminReportController);
|
||||
|
||||
// Not (yet) implemented.
|
||||
app.get('/api/v1/custom_emojis', emptyArrayController);
|
||||
|
|
|
@ -67,7 +67,7 @@ const adminReportsController: AppController = async (c) => {
|
|||
};
|
||||
|
||||
/** https://docs.joinmastodon.org/methods/admin/reports/#get-one */
|
||||
const singleAdminReportsController: AppController = async (c) => {
|
||||
const adminReportController: AppController = async (c) => {
|
||||
const eventId = c.req.param('id');
|
||||
const { signal } = c.req.raw;
|
||||
const store = c.get('store');
|
||||
|
@ -88,4 +88,4 @@ const singleAdminReportsController: AppController = async (c) => {
|
|||
return c.json(await renderAdminReport(event, { viewerPubkey: pubkey }));
|
||||
};
|
||||
|
||||
export { adminReportsController, reportsController, singleAdminReportsController };
|
||||
export { adminReportController, adminReportsController, reportsController };
|
||||
|
|
Loading…
Reference in New Issue