Allow filter on tags

This commit is contained in:
Zoe Roux
2025-01-24 19:17:55 +01:00
parent 426665c9d9
commit ce81caaf14
5 changed files with 25 additions and 23 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import type { Column } from "drizzle-orm";
import type { Column, SQL } from "drizzle-orm";
import { t } from "elysia";
import { KErrorT } from "~/models/error";
import { comment } from "~/utils";
@@ -8,11 +8,11 @@ import { toDrizzle } from "./to-sql";
export type FilterDef = {
[key: string]:
| {
column: Column;
column: Column | SQL;
type: "int" | "float" | "date" | "string";
isArray?: boolean;
}
| { column: Column; type: "enum"; values: string[]; isArray?: boolean };
| { column: Column | SQL; type: "enum"; values: string[]; isArray?: boolean };
};
export const Filter = ({
-1
View File
@@ -52,7 +52,6 @@ export const Sort = <
),
)
.Decode((sort): Sort<T, Remap> => {
console.log(sort);
const random = sort.find((x) => x.startsWith("random"));
if (random) {
const seed = random.includes(":")