Revise docs for working with CRUD secrets

This commit is contained in:
Tuan Dang
2023-03-06 18:52:30 +07:00
parent ff2ee989d6
commit 6abbc1c54d
24 changed files with 1807 additions and 568 deletions
@@ -37,7 +37,7 @@ export const useCreateServiceToken = () => {
return useMutation<CreateServiceTokenRes, {}, CreateServiceTokenDTO>({
mutationFn: async (body) => {
const { data } = await apiRequest.post('/api/v2/service-token/', body);
data.serviceToken += `.${ body.randomBytes}`;
data.serviceToken += `.${body.randomBytes}`;
return data;
},
onSuccess: ({ serviceTokenData: { workspace } }) => {
@@ -19,6 +19,7 @@ export type CreateServiceTokenDTO = {
iv: string;
tag: string;
randomBytes: string;
permissions: ('read' | 'write')[];
};
export type CreateServiceTokenRes = {