Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

old commit #79

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/app/api/[resource]/route.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defaultHandler } from "ra-data-simple-prisma";
import { RaPayload, defaultHandler } from "ra-data-simple-prisma";
import { prismaClient } from "db";
import { NextResponse } from "next/server";
import { checkAccess } from "../../../auth/checkAccess";

const route = async (req: Request) => {
const body = await req.json();
const body = (await req.json()) as RaPayload;

const access = await checkAccess(body);

Expand Down
6 changes: 4 additions & 2 deletions apps/admin/resources/Media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const MediaList = (props: ListProps) => (
key="createdAt_gte"
label="Created after"
source="createdAt_gte"
alwaysOn
/>,
]}
>
Expand All @@ -32,7 +31,10 @@ export const MediaList = (props: ListProps) => (
);

export const MediaCreate = (props: CreateProps) => (
<Create title="New media" {...props}>
<Create
title="New media"
{...props}
>
<SimpleForm>
<TextInput source="url" />
</SimpleForm>
Expand Down
1 change: 1 addition & 0 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "./dist/prismaClient.mjs",
"types": "./dist/prismaClient.d.ts",
"scripts": {
"build": "tsup prisma/prismaClient.ts --format esm,cjs",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does prisma need to be built on its own? it will be bundled by the app using it 🤔

"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "tsup prisma/prismaClient.ts --format esm,cjs --watch --dts",
"lint": "TIMING=1 eslint src --fix",
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-data-simple-prisma/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"noUnusedParameters": false,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": false
"strict": true
},
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
Expand Down