feat: define reports endpoint

This commit is contained in:
P. Reis 2024-05-01 20:38:30 -03:00
parent 5f5749db9b
commit e8088c9eed
2 changed files with 10 additions and 0 deletions

View File

@ -77,6 +77,7 @@ import { cache } from '@/middleware/cache.ts';
import { csp } from '@/middleware/csp.ts'; import { csp } from '@/middleware/csp.ts';
import { adminRelaysController } from '@/controllers/api/ditto.ts'; import { adminRelaysController } from '@/controllers/api/ditto.ts';
import { storeMiddleware } from '@/middleware/store.ts'; import { storeMiddleware } from '@/middleware/store.ts';
import { reportsController } from '@/controllers/api/reports.ts';
interface AppEnv extends HonoEnv { interface AppEnv extends HonoEnv {
Variables: { Variables: {
@ -192,6 +193,8 @@ app.delete('/api/v1/pleroma/admin/statuses/:id', requireRole('admin'), pleromaAd
app.get('/api/v1/admin/ditto/relays', requireRole('admin'), adminRelaysController); app.get('/api/v1/admin/ditto/relays', requireRole('admin'), adminRelaysController);
app.put('/api/v1/admin/ditto/relays', requireRole('admin'), adminRelaysController); app.put('/api/v1/admin/ditto/relays', requireRole('admin'), adminRelaysController);
app.post('/api/v1/reports', requirePubkey, reportsController);
// Not (yet) implemented. // Not (yet) implemented.
app.get('/api/v1/custom_emojis', emptyArrayController); app.get('/api/v1/custom_emojis', emptyArrayController);
app.get('/api/v1/filters', emptyArrayController); app.get('/api/v1/filters', emptyArrayController);

View File

@ -0,0 +1,7 @@
import { type AppController } from '@/app.ts';
const reportsController: AppController = (c) => {
return c.json('Reports endpoint');
};
export { reportsController };