Implement apps API (the stupid way)
This commit is contained in:
parent
484a396a64
commit
8ed662321d
|
@ -0,0 +1,21 @@
|
|||
import type { Context } from '@/deps.ts';
|
||||
|
||||
const FAKE_APP = {
|
||||
id: '1',
|
||||
name: 'Nostrverse',
|
||||
website: null,
|
||||
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
client_id: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
client_secret: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
vapid_key: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
|
||||
};
|
||||
|
||||
function createAppController(c: Context) {
|
||||
return c.json(FAKE_APP);
|
||||
}
|
||||
|
||||
function appVerifyCredentials(c: Context) {
|
||||
return c.json(FAKE_APP);
|
||||
}
|
||||
|
||||
export { appVerifyCredentials, createAppController };
|
|
@ -1,4 +1,5 @@
|
|||
import { Hono } from '@/deps.ts';
|
||||
import { appVerifyCredentials, createAppController } from './api/apps.ts';
|
||||
|
||||
import instanceController from './api/instance.ts';
|
||||
|
||||
|
@ -6,4 +7,7 @@ const app = new Hono();
|
|||
|
||||
app.get('/api/v1/instance', instanceController);
|
||||
|
||||
app.get('/api/v1/apps/verify_credentials', appVerifyCredentials);
|
||||
app.post('/api/v1/apps', createAppController);
|
||||
|
||||
export default app;
|
||||
|
|
Loading…
Reference in New Issue