-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #479 from SquirrelCorporation/chore-add-masternode…
…-url-settings [CHORE] Prevent duplicate cache setting for masterNodeUrl
- Loading branch information
Showing
7 changed files
with
96 additions
and
2 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
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,11 @@ | ||
import { SsmAnsible } from 'ssm-shared-lib'; | ||
import { setToCache } from '../../../data/cache'; | ||
import { SuccessResponse } from '../../../middlewares/api/ApiResponse'; | ||
|
||
export const postMasterNodeUrlValue = async (req, res) => { | ||
const { value } = req.body; | ||
await setToCache(SsmAnsible.DefaultSharedExtraVarsList.MASTER_NODE_URL, value); | ||
new SuccessResponse('Set master node url value', { | ||
value, | ||
}).send(res); | ||
}; |
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,4 @@ | ||
import { body } from 'express-validator'; | ||
import validator from '../../../middlewares/Validator'; | ||
|
||
export const postMasterNodeUrlValueValidator = [body('value').exists().isString(), validator]; |
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