-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
78113 allow regenerate deploy key and secret (#272)
* Added button regenerate deploy key * Add generate deploy key button * Fixed effects * Updated changed application
- Loading branch information
Showing
4 changed files
with
89 additions
and
12 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
14 changes: 14 additions & 0 deletions
14
src/components/page-configuration/use-regenerate-deploy-key-and-secret.js
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,14 @@ | ||
import { usePostJson } from '../../effects'; | ||
var phraseit = require('phraseit'); | ||
|
||
const useRegenerateDeployKeyAndSecret = (appName) => { | ||
const path = `/applications/${appName}/regenerate-deploy-key`; | ||
var sharedSecret = phraseit.make('{{an_adjective}} {{adjective}} {{noun}}'); | ||
return usePostJson(path, () => { | ||
return { | ||
sharedSecret: sharedSecret, | ||
}; | ||
}); | ||
}; | ||
|
||
export default useRegenerateDeployKeyAndSecret; |