Add landing page
This commit is contained in:
parent
610ce4444a
commit
cb8e78ab59
|
@ -14,6 +14,7 @@ import instanceController from './controllers/api/instance.ts';
|
|||
import { createTokenController, oauthAuthorizeController, oauthController } from './controllers/api/oauth.ts';
|
||||
import { contextController, createStatusController, statusController } from './controllers/api/statuses.ts';
|
||||
import { requireAuth, setAuth } from './middleware/auth.ts';
|
||||
import { indexController } from './controllers/site.ts';
|
||||
|
||||
interface AppEnv extends HonoEnv {
|
||||
Variables: {
|
||||
|
@ -65,6 +66,8 @@ app.get('/api/v1/mutes', emptyArrayController);
|
|||
app.get('/api/v1/domain_blocks', emptyArrayController);
|
||||
app.get('/api/v1/markers', emptyObjectController);
|
||||
|
||||
app.get('/', indexController);
|
||||
|
||||
export default app;
|
||||
|
||||
export type { AppContext, AppController, AppMiddleware };
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import { LOCAL_DOMAIN } from '@/config.ts';
|
||||
|
||||
import type { AppController } from '@/app.ts';
|
||||
|
||||
/** Landing page controller. */
|
||||
const indexController: AppController = (c) => {
|
||||
return c.text(`Please connect with a Mastodon client:
|
||||
|
||||
${LOCAL_DOMAIN}
|
||||
|
||||
Ditto <https://gitlab.com/soapbox-pub/ditto>
|
||||
`);
|
||||
};
|
||||
|
||||
export { indexController };
|
Loading…
Reference in New Issue