Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgutgon committed Dec 19, 2024
1 parent daa70e6 commit 3712dd3
Show file tree
Hide file tree
Showing 18 changed files with 93 additions and 1,231 deletions.
20 changes: 14 additions & 6 deletions apps/gateway/src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
const BASE_PATH = '/api'
const V1_PATH = `${BASE_PATH}/v1`
const V2_PATH = `${BASE_PATH}/v2`

const PROJECTS = `${V2_PATH}/projects`
const PROJECTS = 'projects'
const PROJECT_DETAIL = `${PROJECTS}/{projectId}`
const VERSIONS = `${PROJECT_DETAIL}/versions`
const VERSION_DETAIL = `${VERSIONS}/{versionUuid}`

const DOCUMENTS = `${VERSION_DETAIL}/documents`

const V1_DOCUMENTS = `${V1_PATH}/${DOCUMENTS}`
const V2_DOCUMENTS = `${V2_PATH}/${DOCUMENTS}`
export const ROUTES = {
v1: {
documents: {
get: `${V1_DOCUMENTS}/:documentPath{.+}`,
logs: `${V1_DOCUMENTS}/logs`,
},
},
v2: {
documents: {
get: `${DOCUMENTS}/:documentPath{.+}`,
getOrCreate: `${DOCUMENTS}/get-or-create`,
run: `${DOCUMENTS}/run`,
logs: `${DOCUMENTS}/logs`,
get: `${V2_DOCUMENTS}/:documentPath{.+}`,
getOrCreate: `${V2_DOCUMENTS}/get-or-create`,
run: `${V2_DOCUMENTS}/run`,
logs: `${V2_DOCUMENTS}/logs`,
},
},
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { Hono } from 'hono'

import { getHandler } from './handlers/get'
import { runHandler } from './handlers/run'
import { logsRouterV1 } from './logs'

const router = new Hono()

router.get('/:documentPath{.+}', ...getHandler)
router.post('/run', ...runHandler)
router.route('/logs', logsRouterV1)

export { router as documentsRouter }

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3712dd3

Please sign in to comment.