Skip to content

Commit

Permalink
Begin moving /secret/workspaceId routes to /workspace/workspaceId
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Dec 27, 2022
1 parent 229fef8 commit 07c34c4
Show file tree
Hide file tree
Showing 7 changed files with 761 additions and 1 deletion.
10 changes: 9 additions & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
workspace as eeWorkspaceRouter,
secret as eeSecretRouter
} from './ee/routes/v1';

import {
signup as v1SignupRouter,
auth as v1AuthRouter,
Expand All @@ -35,6 +34,10 @@ import {
integration as v1IntegrationRouter,
integrationAuth as v1IntegrationAuthRouter
} from './routes/v1';
import {
secret as v2SecretRouter,
workspace as v2WorkspaceRouter
} from './routes/v2';

import { getLogger } from './utils/logger';
import { RouteNotFoundError } from './utils/errors';
Expand Down Expand Up @@ -86,6 +89,11 @@ app.use('/api/v1/stripe', v1StripeRouter);
app.use('/api/v1/integration', v1IntegrationRouter);
app.use('/api/v1/integration-auth', v1IntegrationAuthRouter);

// v2 routes (new)
app.use('/api/v1/workspace', v2WorkspaceRouter);
app.use('/api/v1/secret', v2SecretRouter);


//* Handle unrouted requests and respond with proper error message as well as status code
app.use((req, res, next)=>{
if(res.headersSent) return next();
Expand Down
5 changes: 5 additions & 0 deletions backend/src/controllers/v2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as workspaceController from './workspaceController';

export {
workspaceController
}
Empty file.
Loading

0 comments on commit 07c34c4

Please sign in to comment.