mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
Return workspaceId in response for service token key copy
This commit is contained in:
@@ -213,7 +213,7 @@ export const getSecretByNameRaw = async (req: Request, res: Response) => {
|
|||||||
workspaceId: new Types.ObjectId(workspaceId),
|
workspaceId: new Types.ObjectId(workspaceId),
|
||||||
environment,
|
environment,
|
||||||
secretPath,
|
secretPath,
|
||||||
acceptedPermissions: [Permission.READ]
|
acceptedPermissions: [Permission.READ, Permission.READ_WRITE]
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -633,7 +633,7 @@ export const getSecretByName = async (req: Request, res: Response) => {
|
|||||||
workspaceId: new Types.ObjectId(workspaceId),
|
workspaceId: new Types.ObjectId(workspaceId),
|
||||||
environment,
|
environment,
|
||||||
secretPath,
|
secretPath,
|
||||||
acceptedPermissions: [Permission.READ]
|
acceptedPermissions: [Permission.READ, Permission.READ_WRITE]
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ export const getServiceTokenDataKey = async (req: Request, res: Response) => {
|
|||||||
message: "Failed to find project key for service token"
|
message: "Failed to find project key for service token"
|
||||||
});
|
});
|
||||||
|
|
||||||
const { _id, encryptedKey, nonce, sender: { publicKey } } = key;
|
const { _id, workspace, encryptedKey, nonce, sender: { publicKey } } = key;
|
||||||
|
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
key: {
|
key: {
|
||||||
_id,
|
_id,
|
||||||
|
workspace,
|
||||||
encryptedKey,
|
encryptedKey,
|
||||||
publicKey,
|
publicKey,
|
||||||
nonce
|
nonce
|
||||||
|
|||||||
Reference in New Issue
Block a user