mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-23 14:36:29 +01:00
rename project folder
This commit is contained in:
parent
09d1925cc0
commit
3c197d8ebe
9 changed files with 0 additions and 0 deletions
17
api/src/index.ts
Normal file
17
api/src/index.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { Hono } from 'hono'
|
||||
import { bearerAuth } from 'hono/bearer-auth'
|
||||
import notification from './notification'
|
||||
import logbook from './logbook'
|
||||
|
||||
// create app
|
||||
const app = new Hono()
|
||||
|
||||
// add bearer authentication
|
||||
const token = 'insecure-token'
|
||||
|
||||
app.use('/*', bearerAuth({ token }))
|
||||
|
||||
// define routes & export app
|
||||
app.route('/notification', notification)
|
||||
app.route('/logbook', logbook)
|
||||
export default app
|
||||
13
api/src/logbook.ts
Normal file
13
api/src/logbook.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Hono } from 'hono'
|
||||
|
||||
const app = new Hono()
|
||||
|
||||
app.get('/list', (c) => {
|
||||
return c.json(
|
||||
{
|
||||
message: 'List all logbook entries'
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
export default app
|
||||
13
api/src/notification.ts
Normal file
13
api/src/notification.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Hono } from 'hono'
|
||||
|
||||
const app = new Hono()
|
||||
|
||||
app.get('/list', (c) => {
|
||||
return c.json(
|
||||
{
|
||||
message: 'List all notification methods'
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
export default app
|
||||
Loading…
Add table
Add a link
Reference in a new issue