-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daa70e6
commit 3712dd3
Showing
18 changed files
with
93 additions
and
1,231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`, | ||
}, | ||
}, | ||
} |
74 changes: 0 additions & 74 deletions
74
.../routes/api/v1/projects/[projectId]/versions/[versionUuid]/documents/handlers/get.test.ts
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...y/src/routes/api/v1/projects/[projectId]/versions/[versionUuid]/documents/handlers/get.ts
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
.../gateway/src/routes/api/v1/projects/[projectId]/versions/[versionUuid]/documents/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
8 changes: 0 additions & 8 deletions
8
...way/src/routes/api/v1/projects/[projectId]/versions/[versionUuid]/documents/logs/index.ts
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
...pi/v2/projects/[projectId]/versions/[versionUuid]/documents/handlers/documentPresenter.ts
This file was deleted.
Oops, something went wrong.
186 changes: 0 additions & 186 deletions
186
...api/v2/projects/[projectId]/versions/[versionUuid]/documents/handlers/getOrCreate.test.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.