Merge branch 'main' into harkirat/Protect

This commit is contained in:
Harkirat Singh
2024-01-10 10:45:19 +05:30
committed by GitHub
12 changed files with 693 additions and 339 deletions

View File

@ -13,7 +13,7 @@
"eslint-config-next": "13.4.19",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.3",
"eslint-plugin-package-json": "^0.1.4",
"eslint-plugin-package-json": "^0.2.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-unused-imports": "^3.0.0",

View File

@ -8,6 +8,7 @@ export type CreateDocumentMetaOptions = {
message: string;
timezone: string;
dateFormat: string;
userId: number;
};
export const upsertDocumentMeta = async ({
@ -16,7 +17,15 @@ export const upsertDocumentMeta = async ({
timezone,
dateFormat,
documentId,
userId,
}: CreateDocumentMetaOptions) => {
await prisma.document.findFirstOrThrow({
where: {
id: documentId,
userId,
},
});
return await prisma.documentMeta.upsert({
where: {
documentId,

View File

@ -8,7 +8,7 @@
},
"dependencies": {
"autoprefixer": "^10.4.13",
"postcss": "^8.4.21",
"postcss": "^8.4.32",
"tailwindcss": "3.3.2",
"tailwindcss-animate": "^1.0.5"
},

View File

@ -188,6 +188,7 @@ export const documentRouter = router({
message: meta.message,
dateFormat: meta.dateFormat,
timezone: meta.timezone,
userId: ctx.user.id,
});
}