mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
9 lines
309 B
TypeScript
9 lines
309 B
TypeScript
import { defineQuery } from "@rocicorp/zero";
|
|
import { z } from "zod";
|
|
import { zql } from "../schema/index";
|
|
|
|
export const notificationQueries = {
|
|
byUser: defineQuery(z.object({ userId: z.string() }), ({ args: { userId } }) =>
|
|
zql.notifications.where("userId", userId).orderBy("createdAt", "desc")
|
|
),
|
|
};
|