Expose ssh endpoints to api reference, update ssh sign/issue endpoints

This commit is contained in:
Tuan Dang
2024-12-18 10:59:28 -08:00
parent fed99a14a8
commit a0411e3ba8
18 changed files with 101 additions and 5 deletions
+8 -2
View File
@@ -68,7 +68,10 @@ export const useSignSshKey = () => {
const queryClient = useQueryClient();
return useMutation<TSignSshKeyResponse, {}, TSignSshKeyDTO>({
mutationFn: async (body) => {
const { data } = await apiRequest.post<TSignSshKeyResponse>("/api/v1/ssh/sign", body);
const { data } = await apiRequest.post<TSignSshKeyResponse>(
"/api/v1/ssh/certificates/sign",
body
);
return data;
},
onSuccess: (_, { projectId }) => {
@@ -81,7 +84,10 @@ export const useIssueSshCreds = () => {
const queryClient = useQueryClient();
return useMutation<TIssueSshCredsResponse, {}, TIssueSshCredsDTO>({
mutationFn: async (body) => {
const { data } = await apiRequest.post<TIssueSshCredsResponse>("/api/v1/ssh/issue", body);
const { data } = await apiRequest.post<TIssueSshCredsResponse>(
"/api/v1/ssh/certificates/issue",
body
);
return data;
},
onSuccess: (_, { projectId }) => {