package updates, minor bug fixes, stack items, background animation fixes
This commit is contained in:
@@ -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