add docs, start planning this app a bit better.

This commit is contained in:
Dave Smith-Hayes 2024-02-16 22:44:11 -05:00
parent 5ee4d3f0d9
commit cddbc7fa89
3 changed files with 49 additions and 0 deletions

23
docs/api.yml Normal file
View File

@ -0,0 +1,23 @@
openapi: '3.0.3'
info:
title: Slovocast API
description: The Slovocast internal API Service definition
contact:
name: Dave Smith-Hayes
email: me@davesmithhayes.com
url: https://slovocast.com
version: 1.0.0
components:
schemas:
User:
type: object
properties:
id:
type: integer
format: uint64
email:
type: string
format: email
password:
type: string

View File

@ -0,0 +1,16 @@
import { Hono, Context } from 'hono';
const channelRoutes = new Hono();
channelRoutes.get('/:channelSlug', async (c: Context) => {
return c.json([
{
channel: {
name: 'Something'
}
}
]);
});
export default channelRoutes;

View File

@ -35,4 +35,14 @@ app.post('/register', async (c: Context) => {
}
});
app.post('/login', async (c: Context) => {
return c.json({ "success": true });
});
app.post('/create/channel', async (c: Context) => {
return c.json({ "success": true });
});
export default app;