Fixed service token bug

This commit is contained in:
Vladyslav Matsiiako
2023-02-09 13:40:33 -08:00
parent dd7e8d254b
commit 6ab6147ac8
3 changed files with 4 additions and 4 deletions
@@ -37,6 +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}`;
return data;
},
onSuccess: ({ serviceTokenData: { workspace } }) => {
@@ -18,6 +18,7 @@ export type CreateServiceTokenDTO = {
encryptedKey: string;
iv: string;
tag: string;
randomBytes: string;
};
export type CreateServiceTokenRes = {