mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 20:27:43 +00:00
Fix: added nullable check for adding tag color in project settings
This commit is contained in:
@@ -38,7 +38,7 @@ export const useCreateWsTag = () => {
|
|||||||
mutationFn: async ({ workspaceID, tagName, tagColor, tagSlug }) => {
|
mutationFn: async ({ workspaceID, tagName, tagColor, tagSlug }) => {
|
||||||
const { data } = await apiRequest.post(`/api/v2/workspace/${workspaceID}/tags`, {
|
const { data } = await apiRequest.post(`/api/v2/workspace/${workspaceID}/tags`, {
|
||||||
name: tagName,
|
name: tagName,
|
||||||
tagColor,
|
tagColor: tagColor || null,
|
||||||
slug: tagSlug
|
slug: tagSlug
|
||||||
})
|
})
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export type CreateTagDTO = {
|
|||||||
workspaceID: string;
|
workspaceID: string;
|
||||||
tagSlug: string;
|
tagSlug: string;
|
||||||
tagName: string;
|
tagName: string;
|
||||||
tagColor: string;
|
tagColor: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CreateTagRes = {
|
export type CreateTagRes = {
|
||||||
|
|||||||
+2
-1
@@ -53,7 +53,8 @@ export const AddSecretTagModal = ({
|
|||||||
await createWsTag.mutateAsync({
|
await createWsTag.mutateAsync({
|
||||||
workspaceID: currentWorkspace?._id,
|
workspaceID: currentWorkspace?._id,
|
||||||
tagName: name,
|
tagName: name,
|
||||||
tagSlug: name.replace(" ", "_")
|
tagSlug: name.replace(" ", "_"),
|
||||||
|
tagColor: null
|
||||||
});
|
});
|
||||||
|
|
||||||
handlePopUpClose("CreateSecretTag");
|
handlePopUpClose("CreateSecretTag");
|
||||||
|
|||||||
Reference in New Issue
Block a user