mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add alchemy and improve cli tooling and structure (#520)
This commit is contained in:
31
packages/backend/convex/testimonials.ts
Normal file
31
packages/backend/convex/testimonials.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { v } from "convex/values";
|
||||
import { query } from "./_generated/server";
|
||||
|
||||
export const getVideos = query({
|
||||
args: {},
|
||||
returns: v.array(
|
||||
v.object({
|
||||
_id: v.id("videos"),
|
||||
_creationTime: v.number(),
|
||||
embedId: v.string(),
|
||||
title: v.string(),
|
||||
}),
|
||||
),
|
||||
handler: async (ctx) => {
|
||||
return await ctx.db.query("videos").collect();
|
||||
},
|
||||
});
|
||||
|
||||
export const getTweets = query({
|
||||
args: {},
|
||||
returns: v.array(
|
||||
v.object({
|
||||
_id: v.id("tweets"),
|
||||
_creationTime: v.number(),
|
||||
tweetId: v.string(),
|
||||
}),
|
||||
),
|
||||
handler: async (ctx) => {
|
||||
return await ctx.db.query("tweets").collect();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user