mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-24 08:44:25 +01:00
Add boilerplate accounts controller and fallback controller
This commit is contained in:
13
src/app.ts
13
src/app.ts
@@ -1,6 +1,8 @@
|
||||
import { Hono } from '@/deps.ts';
|
||||
|
||||
import { appVerifyCredentials, createAppController } from './api/apps.ts';
|
||||
import { credentialsController } from './api/accounts.ts';
|
||||
import { appCredentialsController, createAppController } from './api/apps.ts';
|
||||
import { emptyArrayController } from './api/fallback.ts';
|
||||
import instanceController from './api/instance.ts';
|
||||
import { createTokenController } from './api/oauth.ts';
|
||||
|
||||
@@ -8,9 +10,16 @@ const app = new Hono();
|
||||
|
||||
app.get('/api/v1/instance', instanceController);
|
||||
|
||||
app.get('/api/v1/apps/verify_credentials', appVerifyCredentials);
|
||||
app.get('/api/v1/apps/verify_credentials', appCredentialsController);
|
||||
app.post('/api/v1/apps', createAppController);
|
||||
|
||||
app.post('/oauth/token', createTokenController);
|
||||
|
||||
app.get('/api/v1/accounts/verify_credentials', credentialsController);
|
||||
|
||||
// Not (yet) implemented.
|
||||
app.get('/api/v1/timelines/*', emptyArrayController);
|
||||
app.get('/api/v1/accounts/:id/statuses', emptyArrayController);
|
||||
app.get('/api/v1/bookmarks', emptyArrayController);
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user