mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 08:14:06 +00:00
feat: move feature to org level
This commit is contained in:
@@ -20,11 +20,11 @@ export const useDeleteSharedSecret = () => {
|
||||
return useMutation<
|
||||
TSharedSecret,
|
||||
{ message: string },
|
||||
{ sharedSecretId: string; workspaceId: string }
|
||||
{ sharedSecretId: string }
|
||||
>({
|
||||
mutationFn: async ({ sharedSecretId, workspaceId }: TDeleteSharedSecretRequest) => {
|
||||
mutationFn: async ({ sharedSecretId }: TDeleteSharedSecretRequest) => {
|
||||
const { data } = await apiRequest.delete<TSharedSecret>(
|
||||
`/api/v1/secret-sharing/${workspaceId}/${sharedSecretId}`
|
||||
`/api/v1/secret-sharing/${sharedSecretId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -4,12 +4,12 @@ import { apiRequest } from "@app/config/request";
|
||||
|
||||
import { TSharedSecret, TViewSharedSecretResponse } from "./types";
|
||||
|
||||
export const useGetSharedSecrets = (workspaceId: string) => {
|
||||
export const useGetSharedSecrets = () => {
|
||||
return useQuery({
|
||||
queryKey: ["sharedSecrets"],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TSharedSecret[]>(
|
||||
`/api/v1/secret-sharing/${workspaceId}`
|
||||
"/api/v1/secret-sharing/"
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ export type TCreateSharedSecretRequest = {
|
||||
name: string;
|
||||
signedValue: string;
|
||||
expiresAt: Date;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
export type TViewSharedSecretResponse = {
|
||||
@@ -23,5 +22,4 @@ export type TViewSharedSecretResponse = {
|
||||
|
||||
export type TDeleteSharedSecretRequest = {
|
||||
sharedSecretId: string;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user