-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin action route for getting an action by id
- Loading branch information
1 parent
3c349b1
commit 4dac65e
Showing
6 changed files
with
43 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Request, Response } from 'express'; | ||
import * as Sentry from '@sentry/node'; | ||
import { Action } from '../../models'; | ||
|
||
export const getAction = (req: Request, res: Response) => { | ||
let action; | ||
// try { | ||
// const { actionId } = req.params; | ||
|
||
// action = await Action.findById(actionId); | ||
|
||
|
||
// } catch (err) { | ||
|
||
// } | ||
|
||
return res.status(200).send({ | ||
action | ||
}); | ||
} |
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,9 +1,11 @@ | ||
import * as stripeController from './stripeController'; | ||
import * as secretController from './secretController'; | ||
import * as workspaceController from './workspaceController'; | ||
import * as actionController from './actionController'; | ||
|
||
export { | ||
stripeController, | ||
secretController, | ||
workspaceController | ||
workspaceController, | ||
actionController | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import express from 'express'; | ||
const router = express.Router(); | ||
import { | ||
validateRequest | ||
} from '../../../middleware'; | ||
import { param } from 'express-validator'; | ||
import { actionController } from '../../controllers/v1'; | ||
|
||
// TODO: put into action controller | ||
router.get( | ||
'/:actionId', | ||
param('actionId').exists().trim(), | ||
validateRequest, | ||
actionController.getAction | ||
); | ||
|
||
export default router; |
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,9 +1,9 @@ | ||
import secret from './secret'; | ||
import workspace from './workspace'; | ||
import log from './log'; | ||
import action from './action'; | ||
|
||
export { | ||
secret, | ||
workspace, | ||
log | ||
action | ||
} |
This file was deleted.
Oops, something went wrong.