From 6e70e14a40b5a8874afeafa3401dd69c91f9062c Mon Sep 17 00:00:00 2001 From: nyaomaru Date: Sat, 21 Sep 2024 09:15:05 +0900 Subject: [PATCH] refactor --- README.md | 2 ++ csp-reports.txt | 43 ------------------------------- src/components/Button.tsx | 4 +-- src/components/Link.tsx | 4 +-- src/islands/Countdown.tsx | 2 +- src/providers/LeafletProvider.tsx | 2 -- src/routes/api/users/[id].ts | 20 +++++++------- src/routes/api/users/index.ts | 5 ++-- src/utils/api.ts | 10 +++++++ 9 files changed, 30 insertions(+), 62 deletions(-) delete mode 100644 csp-reports.txt create mode 100644 src/utils/api.ts diff --git a/README.md b/README.md index 0436523..992e21c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This project is deno with πŸ‹freshπŸ‹ sample project +[![Made with Fresh](https://fresh.deno.dev/fresh-badge-dark.svg)](https://fresh.deno.dev) + ## πŸš€ Get started You run below command diff --git a/csp-reports.txt b/csp-reports.txt deleted file mode 100644 index 2ba2d67..0000000 --- a/csp-reports.txt +++ /dev/null @@ -1,43 +0,0 @@ -{ - "csp-report": { - "document-uri": "http://localhost:8000/correctCSPwithReport", - "referrer": "http://localhost:8000/", - "violated-directive": "style-src-elem", - "effective-directive": "style-src-elem", - "original-policy": "default-src 'none'; style-src 'unsafe-inline' http://www.example.com; report-uri http://localhost:8000/reportHandler; script-src 'nonce-71d90af6c22f47f3b28399209fdd8dc5'; connect-src 'self'", - "disposition": "report", - "blocked-uri": "http://localhost:8000/example.css", - "line-number": 1, - "source-file": "http://localhost:8000/correctCSPwithReport", - "status-code": 200, - "script-sample": "" - } -} -{ - "csp-report": { - "document-uri": "http://localhost:8000/correctCSPwithReport", - "referrer": "http://localhost:8000/", - "violated-directive": "style-src-elem", - "effective-directive": "style-src-elem", - "original-policy": "default-src 'none'; style-src 'unsafe-inline' http://www.example.com; report-uri http://localhost:8000/reportHandler; script-src 'nonce-71d90af6c22f47f3b28399209fdd8dc5'; connect-src 'self'", - "disposition": "report", - "blocked-uri": "http://localhost:8000/styles.css", - "line-number": 1, - "source-file": "http://localhost:8000/correctCSPwithReport", - "status-code": 200, - "script-sample": "" - } -} -{ - "csp-report": { - "document-uri": "http://localhost:8000/correctCSPwithReport", - "referrer": "http://localhost:8000/", - "violated-directive": "img-src", - "effective-directive": "img-src", - "original-policy": "default-src 'none'; style-src 'unsafe-inline' http://www.example.com; report-uri http://localhost:8000/reportHandler; script-src 'nonce-71d90af6c22f47f3b28399209fdd8dc5'; connect-src 'self'", - "disposition": "report", - "blocked-uri": "http://localhost:8000/favicon.ico", - "status-code": 200, - "script-sample": "" - } -} diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 27a4d24..ea519aa 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -12,11 +12,11 @@ export function Button(