mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-23 15:42:28 -04:00
Allow filter on tags
This commit is contained in:
@@ -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 = ({
|
||||
|
||||
@@ -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(":")
|
||||
|
||||
Reference in New Issue
Block a user