mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 23:27:14 +00:00
fix:unauthorized response for app name
This commit is contained in:
@@ -789,7 +789,7 @@ const getAppsWindmill = async ({ accessToken }: { accessToken: string }) => {
|
|||||||
const authCheckForApps = async (data: any) => {
|
const authCheckForApps = async (data: any) => {
|
||||||
const allAppResponse = data.map(async (app: any) => {
|
const allAppResponse = data.map(async (app: any) => {
|
||||||
return standardRequest.get(
|
return standardRequest.get(
|
||||||
`${INTEGRATION_WINDMILL_API_URL}/w/${app.name}/users/whoami`,
|
`${INTEGRATION_WINDMILL_API_URL}/w/${app.id}/users/whoami`,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`,
|
Authorization: `Bearer ${accessToken}`,
|
||||||
|
|||||||
@@ -2049,7 +2049,7 @@ const syncSecretsWindmill = async ({
|
|||||||
|
|
||||||
// get secrets stored in windmill workspace
|
// get secrets stored in windmill workspace
|
||||||
const { data: getSecretsRes } = await standardRequest.get(
|
const { data: getSecretsRes } = await standardRequest.get(
|
||||||
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.app}/variables/list`,
|
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.appId}/variables/list`,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`,
|
Authorization: `Bearer ${accessToken}`,
|
||||||
@@ -2091,7 +2091,7 @@ const syncSecretsWindmill = async ({
|
|||||||
// create new secrets in windmill workspace
|
// create new secrets in windmill workspace
|
||||||
modifiedFormatForCreateSecretInjection.forEach(async (secretObj: any) => {
|
modifiedFormatForCreateSecretInjection.forEach(async (secretObj: any) => {
|
||||||
await standardRequest.post(
|
await standardRequest.post(
|
||||||
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.app}/variables/create`,
|
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.appId}/variables/create`,
|
||||||
secretObj,
|
secretObj,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
@@ -2105,7 +2105,7 @@ const syncSecretsWindmill = async ({
|
|||||||
// update old secrets already present in windmill workspace
|
// update old secrets already present in windmill workspace
|
||||||
modifiedFormatForUpdateSecretInjection.forEach(async (secretObj: any) => {
|
modifiedFormatForUpdateSecretInjection.forEach(async (secretObj: any) => {
|
||||||
await standardRequest.post(
|
await standardRequest.post(
|
||||||
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.app}/variables/update/${secretObj.path}`,
|
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.appId}/variables/update/${secretObj.path}`,
|
||||||
secretObj,
|
secretObj,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
@@ -2127,7 +2127,7 @@ const syncSecretsWindmill = async ({
|
|||||||
// delete all secrets from secretsToDelete List
|
// delete all secrets from secretsToDelete List
|
||||||
secretsToDelete.forEach(async (secret: string) => {
|
secretsToDelete.forEach(async (secret: string) => {
|
||||||
await standardRequest.delete(
|
await standardRequest.delete(
|
||||||
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.app}/variables/delete/${secret}`,
|
`${INTEGRATION_WINDMILL_API_URL}/w/${integration.appId}/variables/delete/${secret}`,
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`,
|
Authorization: `Bearer ${accessToken}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user