mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
fix: style updates
This commit is contained in:
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Generate Prisma Client
|
- name: Generate Prisma Client
|
||||||
run: npm run prisma:generate -w @documenso/prisma
|
run: npm run prisma:generate -w @documenso/prisma
|
||||||
- name: Create the database
|
- name: Create the database
|
||||||
run: npm run prisma:migrate-dev -w @documenso/prisma
|
run: npm run prisma:migrate-dev
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: npm run ci
|
run: npm run ci
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
|
|||||||
@ -48,7 +48,7 @@ test('user can login with user and password', async ({ page }: { page: Page }) =
|
|||||||
|
|
||||||
test.afterAll('Teardown', async () => {
|
test.afterAll('Teardown', async () => {
|
||||||
try {
|
try {
|
||||||
await deleteUser(email);
|
await deleteUser({ email });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`Error deleting user: ${e}`);
|
throw new Error(`Error deleting user: ${e}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
import { prisma } from '@documenso/prisma';
|
import { prisma } from '@documenso/prisma';
|
||||||
|
|
||||||
export const deleteUser = async (email: string) => {
|
export type DeleteUserOptions = {
|
||||||
|
email: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const deleteUser = async ({ email }: DeleteUserOptions) => {
|
||||||
const user = await prisma.user.findFirst({
|
const user = await prisma.user.findFirst({
|
||||||
where: {
|
where: {
|
||||||
email: {
|
email: {
|
||||||
|
|||||||
@ -110,10 +110,10 @@ model Document {
|
|||||||
Field Field[]
|
Field Field[]
|
||||||
ShareLink DocumentShareLink[]
|
ShareLink DocumentShareLink[]
|
||||||
documentDataId String
|
documentDataId String
|
||||||
documentData DocumentData @relation(fields: [documentDataId], references: [id], onDelete: Cascade)
|
documentData DocumentData @relation(fields: [documentDataId], references: [id], onDelete: Cascade)
|
||||||
documentMeta DocumentMeta?
|
documentMeta DocumentMeta?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
@@unique([documentDataId])
|
@@unique([documentDataId])
|
||||||
}
|
}
|
||||||
@ -133,11 +133,11 @@ model DocumentData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model DocumentMeta {
|
model DocumentMeta {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
subject String?
|
subject String?
|
||||||
message String?
|
message String?
|
||||||
documentId Int @unique
|
documentId Int @unique
|
||||||
document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ReadStatus {
|
enum ReadStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user