Skip to content

Commit dc671bf

Browse files
feat: undo some of the more aggressive changes
1 parent 22dc691 commit dc671bf

6 files changed

Lines changed: 6 additions & 54 deletions

File tree

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ Protected routes: `/accessibility`, `/cookies`, `/privacy`, `/insights`, `/servi
7777
- **Append-only results tables**`accessibility_results`, `cookie_results`, `privacy_results` — never UPDATE. UI uses `DISTINCT ON (service_slug)` for latest per service, with pagination (25 per page)
7878
- **`services` table** — seeded from `services.json`, used by pg-boss worker to look up service data at job processing time
7979
- **`compliance_urls` table** — tracks discovered and manually overridden URLs for accessibility statements, cookie policies, and privacy notices
80-
- **`audit_events` table** — logs security-relevant actions (URL overrides) with user, action, JSONB detail, and timestamp
8180
- **Migrations** in `src/db/migrations/` — numbered SQL files, applied by `src/db/migrate.ts`
8281
- **Sessions**`session` table auto-created by `connect-pg-simple`
8382

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,13 @@ npm run db:seed
5555

5656
## Running locally
5757

58-
### UI only (no worker)
59-
6058
```bash
6159
npm run dev
62-
```
63-
64-
Opens at [http://localhost:3000](http://localhost:3000). This starts only the Express server — no scraping will happen.
65-
66-
### Full app (server + worker)
67-
68-
```bash
60+
npm run dev:watch
6961
npm run build && npm start
7062
```
7163

72-
Starts the Express server and the pg-boss job worker in the same process. The worker runs 3 concurrent scrape loops and a daily cron at 2am London time.
73-
74-
Trigger checks from the Workers page (all services) or from individual service pages (single service).
64+
Opens at [http://localhost:3000](http://localhost:3000)
7565

7666
### Docker Compose
7767

src/server/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export function authRouter(config: Config): Router {
199199
}
200200
});
201201

202-
router.post("/logout", (req, res) => {
202+
router.get("/logout", (req, res) => {
203203
req.session.destroy(() => {
204204
res.redirect("/");
205205
});

src/server/views/layout.njk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@
5757
<span class="govuk-header__link">{{ user.name }}</span>
5858
</li>
5959
<li class="govuk-header__navigation-item">
60-
<form method="post" action="/auth/logout" style="display:inline">
61-
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
62-
<button type="submit" class="govuk-header__link" style="background:none;border:none;cursor:pointer;font:inherit;color:inherit;padding:0;text-decoration:underline;">Sign out</button>
63-
</form>
60+
<a class="govuk-header__link" href="/auth/logout">Sign out</a>
6461
</li>
6562
</ul>
6663
</nav>

tests/e2e/auth.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test.describe("authentication flow", () => {
99

1010
await page.waitForURL("**/accessibility");
1111
await expect(page.getByRole("heading", { level: 1 })).toBeVisible();
12-
await expect(page.getByRole("button", { name: "Sign out" })).toBeVisible();
12+
await expect(page.getByRole("link", { name: "Sign out" })).toBeVisible();
1313
});
1414

1515
test("unauthenticated user is redirected to homepage", async ({ page }) => {
@@ -34,7 +34,7 @@ test.describe("authentication flow", () => {
3434
.click();
3535
await page.waitForURL("**/accessibility");
3636

37-
await page.getByRole("button", { name: "Sign out" }).click();
37+
await page.getByRole("link", { name: "Sign out" }).click();
3838
await expect(page).toHaveURL(/\/$/);
3939

4040
await page.goto("/accessibility");

tests/unit/logout.test.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)