mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(templates): add tag input selector
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
} from "@/templates/utils";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { eq } from "drizzle-orm";
|
||||
import _ from "lodash";
|
||||
import { nanoid } from "nanoid";
|
||||
import { findAdmin } from "../services/admin";
|
||||
import {
|
||||
@@ -283,4 +284,10 @@ export const composeRouter = createTRPCRouter({
|
||||
|
||||
return templatesData;
|
||||
}),
|
||||
|
||||
getTags: protectedProcedure.query(async ({ input }) => {
|
||||
const allTags = templates.flatMap((template) => template.tags);
|
||||
const uniqueTags = _.uniq(allTags);
|
||||
return uniqueTags;
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user