mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 07:30:20 +00:00
Finish Netlify integration v1 full-loop
This commit is contained in:
@@ -9,7 +9,9 @@ import SecurityClient from "~/utilities/SecurityClient";
|
||||
* @param {String} obj.app - name of app
|
||||
* @param {String} obj.environment - project environment to push secrets from
|
||||
* @param {Boolean} obj.isActive - active state
|
||||
* @param {String} obj.target - (optional) target (environment)
|
||||
* @param {String} obj.target - (optional) target (environment) for Vercel integration
|
||||
* @param {String} obj.context - (optional) context (environment) for Netlify integration
|
||||
* @param {String} obj.siteId - (optional) app (site_id) for Netlify integration
|
||||
* @returns
|
||||
*/
|
||||
const updateIntegration = ({
|
||||
@@ -17,7 +19,9 @@ const updateIntegration = ({
|
||||
app,
|
||||
environment,
|
||||
isActive,
|
||||
target
|
||||
target,
|
||||
context,
|
||||
siteId
|
||||
}) => {
|
||||
return SecurityClient.fetchCall(
|
||||
"/api/v1/integration/" + integrationId,
|
||||
@@ -30,7 +34,9 @@ const updateIntegration = ({
|
||||
app,
|
||||
environment,
|
||||
isActive,
|
||||
target
|
||||
target,
|
||||
context,
|
||||
siteId
|
||||
}),
|
||||
}
|
||||
).then(async (res) => {
|
||||
|
||||
@@ -16,11 +16,9 @@ export default function Netlify() {
|
||||
*/
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
useEffect(async () => {
|
||||
console.log('AA');
|
||||
if (state === localStorage.getItem('latestCSRFToken')) {
|
||||
localStorage.removeItem('latestCSRFToken');
|
||||
|
||||
console.log('Netlify', parsedUrl);
|
||||
// http://localhost:8080/netlify?code=qnG0g_krhklWDpdUqfhU-t1sLeZzYI3gF2d6QVnL-Gc&state=3a78cd3154a9a99ddd4eb5d99dbb3289
|
||||
// http://localhost:8080/netlify#access_token=d-78qUAnnSzvlgfG9Y_oUV6_4TQBxLbofImiBbKAjzE&token_type=Bearer&state=5da34fa49e301e9fa1a6e40925694b77
|
||||
|
||||
|
||||
Reference in New Issue
Block a user