mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(web): update sponsors logic
This commit is contained in:
2
packages/backend/convex/_generated/api.d.ts
vendored
2
packages/backend/convex/_generated/api.d.ts
vendored
@@ -12,7 +12,6 @@ import type * as healthCheck from "../healthCheck.js";
|
||||
import type * as hooks from "../hooks.js";
|
||||
import type * as http from "../http.js";
|
||||
import type * as showcase from "../showcase.js";
|
||||
import type * as sponsors from "../sponsors.js";
|
||||
import type * as stats from "../stats.js";
|
||||
import type * as testimonials from "../testimonials.js";
|
||||
|
||||
@@ -35,7 +34,6 @@ declare const fullApi: ApiFromModules<{
|
||||
hooks: typeof hooks;
|
||||
http: typeof http;
|
||||
showcase: typeof showcase;
|
||||
sponsors: typeof sponsors;
|
||||
stats: typeof stats;
|
||||
testimonials: typeof testimonials;
|
||||
}>;
|
||||
|
||||
@@ -2,24 +2,6 @@ import { defineSchema, defineTable } from "convex/server";
|
||||
import { v } from "convex/values";
|
||||
|
||||
export default defineSchema({
|
||||
sponsors: defineTable({
|
||||
sponsor: v.object({
|
||||
login: v.string(),
|
||||
name: v.string(),
|
||||
avatarUrl: v.string(),
|
||||
websiteUrl: v.optional(v.string()),
|
||||
linkUrl: v.string(),
|
||||
customLogoUrl: v.optional(v.string()),
|
||||
type: v.string(),
|
||||
}),
|
||||
isOneTime: v.boolean(),
|
||||
monthlyDollars: v.number(),
|
||||
privacyLevel: v.string(),
|
||||
tierName: v.string(),
|
||||
createdAt: v.string(),
|
||||
provider: v.string(),
|
||||
}),
|
||||
|
||||
videos: defineTable({
|
||||
embedId: v.string(),
|
||||
title: v.string(),
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import { v } from "convex/values";
|
||||
import { query } from "./_generated/server";
|
||||
|
||||
export const getSponsors = query({
|
||||
args: {},
|
||||
returns: v.array(
|
||||
v.object({
|
||||
_id: v.id("sponsors"),
|
||||
_creationTime: v.number(),
|
||||
sponsor: v.object({
|
||||
login: v.string(),
|
||||
name: v.string(),
|
||||
avatarUrl: v.string(),
|
||||
websiteUrl: v.optional(v.string()),
|
||||
linkUrl: v.string(),
|
||||
customLogoUrl: v.optional(v.string()),
|
||||
type: v.string(),
|
||||
}),
|
||||
isOneTime: v.boolean(),
|
||||
monthlyDollars: v.number(),
|
||||
privacyLevel: v.string(),
|
||||
tierName: v.string(),
|
||||
createdAt: v.string(),
|
||||
provider: v.string(),
|
||||
}),
|
||||
),
|
||||
handler: async (ctx) => {
|
||||
return await ctx.db.query("sponsors").collect();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user