package updates, minor bug fixes, stack items, background animation fixes
This commit is contained in:
@@ -43,6 +43,7 @@ export const cvEntry = createTable(
|
||||
.default(sql`CURRENT_TIMESTAMP`)
|
||||
.notNull().$type<Date>(),
|
||||
updatedAt: d.timestamp({ withTimezone: true }).$onUpdate(() => new Date()).$type<Date>(),
|
||||
position: d.integer(),
|
||||
})
|
||||
)
|
||||
|
||||
@@ -55,7 +56,7 @@ export const cvEntryRelations = relations(cvEntry, ({one}) => ({
|
||||
|
||||
export const sourceTypeEnum = pgEnum('source_type',['open','closed'])
|
||||
export const releaseStatus = pgEnum('release_status',['released','unreleased'])
|
||||
export const stackItemEnum = pgEnum('stack_item',['drizzle','postgres','nextjs','react','servercomponents','php','laravel','reactnative','expo','mysql','nginx','protobuf','grpc','java','graalvm','spring','aws','s3','react-native','linux','debian','htmx','neon'])
|
||||
export const stackItemEnum = pgEnum('stack_item',['drizzle','postgres','nextjs','react','servercomponents','php','laravel','reactnative','expo','mysql','nginx','protobuf','grpc','java','graalvm','spring','aws','s3','react-native','linux','debian','htmx','neon','typescript','javafx','x11','zig','libghostty','zod'])
|
||||
|
||||
export const project = createTable(
|
||||
"project",
|
||||
@@ -68,6 +69,7 @@ export const project = createTable(
|
||||
releaseStatus: releaseStatus(),
|
||||
releaseLink: d.varchar({length: 200}),
|
||||
stackId: d.uuid(),
|
||||
orderPos: d.integer(),
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ export const cvCategoryRouter = router({
|
||||
}),
|
||||
getById: publicProcedure.input(z.string()).query(async ({input}) => {
|
||||
const res = await db.query.cvCategory.findFirst({
|
||||
with: {
|
||||
cvEntry: true
|
||||
},
|
||||
where(fields, operators) {
|
||||
return operators.eq(fields.id, input)
|
||||
},
|
||||
|
||||
@@ -13,4 +13,14 @@ export const cvEntryRouter = router({
|
||||
})
|
||||
return res;
|
||||
}),
|
||||
byCategoryAndToDateDescending: publicProcedure.input(z.string()).query(async ({input}) => {
|
||||
const res = await db.query.cvEntry.findMany({
|
||||
with: {
|
||||
category: true
|
||||
},
|
||||
where: (fields, {eq}) => eq(fields.categoryId,input),
|
||||
orderBy: (t,{desc}) => desc(t.toTime),
|
||||
})
|
||||
return res;
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { publicProcedure, router } from "~/server/trpc";
|
||||
import { db } from "~/server/db";
|
||||
import { publicProcedure, router } from "~/server/trpc";
|
||||
|
||||
type ReadmeRequest = {
|
||||
url: string;
|
||||
@@ -71,6 +71,11 @@ async function fetchReadme(sourceLink: string) {
|
||||
export const projectRouter = router({
|
||||
listWithStack: publicProcedure.query(async () => {
|
||||
const projects = await db.query.project.findMany({
|
||||
orderBy: (project, { asc }) => [
|
||||
asc(project.orderPos),
|
||||
asc(project.title),
|
||||
asc(project.id),
|
||||
],
|
||||
with: {
|
||||
techStack: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user