mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 06:28:50 +00:00
feat: added name in attach tag
This commit is contained in:
@@ -81,6 +81,7 @@ export const registerSecretTagRouter = async (server: FastifyZodProvider) => {
|
|||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
|
// akhilmhdh: for terraform backward compatiability
|
||||||
workspaceTag: SecretTagsSchema.extend({ name: z.string() })
|
workspaceTag: SecretTagsSchema.extend({ name: z.string() })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,10 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
tags: SecretTagsSchema.pick({
|
tags: SecretTagsSchema.pick({
|
||||||
id: true,
|
id: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
name: true,
|
|
||||||
color: true
|
color: true
|
||||||
}).array()
|
})
|
||||||
|
.extend({ name: z.string() })
|
||||||
|
.array()
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@@ -116,16 +117,15 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
secret: SecretsSchema.omit({ secretBlindIndex: true }).merge(
|
secret: SecretsSchema.omit({ secretBlindIndex: true }).extend({
|
||||||
z.object({
|
tags: SecretTagsSchema.pick({
|
||||||
tags: SecretTagsSchema.pick({
|
id: true,
|
||||||
id: true,
|
slug: true,
|
||||||
slug: true,
|
color: true
|
||||||
name: true,
|
|
||||||
color: true
|
|
||||||
}).array()
|
|
||||||
})
|
})
|
||||||
)
|
.extend({ name: z.string() })
|
||||||
|
.array()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -196,9 +196,9 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
tags: SecretTagsSchema.pick({
|
tags: SecretTagsSchema.pick({
|
||||||
id: true,
|
id: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
name: true,
|
|
||||||
color: true
|
color: true
|
||||||
})
|
})
|
||||||
|
.extend({ name: z.string() })
|
||||||
.array()
|
.array()
|
||||||
.optional()
|
.optional()
|
||||||
})
|
})
|
||||||
@@ -332,9 +332,9 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
tags: SecretTagsSchema.pick({
|
tags: SecretTagsSchema.pick({
|
||||||
id: true,
|
id: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
name: true,
|
|
||||||
color: true
|
color: true
|
||||||
})
|
})
|
||||||
|
.extend({ name: z.string() })
|
||||||
.array()
|
.array()
|
||||||
.optional()
|
.optional()
|
||||||
})
|
})
|
||||||
@@ -738,9 +738,10 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
tags: SecretTagsSchema.pick({
|
tags: SecretTagsSchema.pick({
|
||||||
id: true,
|
id: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
name: true,
|
|
||||||
color: true
|
color: true
|
||||||
}).array()
|
})
|
||||||
|
.extend({ name: z.string() })
|
||||||
|
.array()
|
||||||
})
|
})
|
||||||
.array(),
|
.array(),
|
||||||
imports: z
|
imports: z
|
||||||
|
|||||||
@@ -2086,7 +2086,7 @@ export const secretServiceFactory = ({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...updatedSecret[0],
|
...updatedSecret[0],
|
||||||
tags: [...existingSecretTags, ...tags].map((t) => ({ id: t.id, slug: t.slug, color: t.color }))
|
tags: [...existingSecretTags, ...tags].map((t) => ({ id: t.id, slug: t.slug, name: t.slug, color: t.color }))
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user