mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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),
|
||||
environment,
|
||||
secretPath,
|
||||
acceptedPermissions: [Permission.READ]
|
||||
acceptedPermissions: [Permission.READ, Permission.READ_WRITE]
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -633,7 +633,7 @@ export const getSecretByName = async (req: Request, res: Response) => {
|
||||
workspaceId: new Types.ObjectId(workspaceId),
|
||||
environment,
|
||||
secretPath,
|
||||
acceptedPermissions: [Permission.READ]
|
||||
acceptedPermissions: [Permission.READ, Permission.READ_WRITE]
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -40,11 +40,12 @@ export const getServiceTokenDataKey = async (req: Request, res: Response) => {
|
||||
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({
|
||||
key: {
|
||||
_id,
|
||||
workspace,
|
||||
encryptedKey,
|
||||
publicKey,
|
||||
nonce
|
||||
|
||||
Reference in New Issue
Block a user