vinterliste/server
Ole-Morten Duesund 95f989639d feat(invites): drop literal token after claim; cleaner UI
Once an invite is claimed, the token has no functional role — claims
are one-way and the link is dead. Stop returning the literal token in
the GET /api/invites response for claimed entries (server/invites.ts
toEntry). The audit trail — claimed_at, claimed_by_display — stays.
Helps a little with data minimization: a compromised inviter account
can no longer see used-up invitation URLs.

Type: InviteEntry.token is now string | null. Callers that still need
to use the token (signup-via-invite tests, the cancel button, the
copy button) are guarded so they only run on entries where the token
is present (i.e. unclaimed). The each-key falls back to a synthetic
composite when token is null so Svelte's keyed-each stays stable.

UI: claimed entries collapse to a single muted line, no card frame,
no URL placeholder:
    ✓ Laget DD.MM.YYYY · godtatt av <bruker> DD.MM.YYYY

Unclaimed entries keep the existing card with copy / cancel buttons.
Heading on the invite section also renamed from "Invitasjonslenker"
to "Invitasjoner" — claimed entries don't have a link anymore so the
older label was misleading.

Tests updated to match by created_at instead of token for the
claimed-invite lookup, and to assert that token is null post-claim.
2026-05-25 20:47:33 +02:00
..
activities.ts fix(activities): close existence oracle on PATCH /:id/sort 2026-05-25 20:34:50 +02:00
admin.ts Admin role, root/home URL split, activity permalinks 2026-05-25 13:23:13 +02:00
auth.ts External profile links (max 5 per user) 2026-05-25 16:20:04 +02:00
db.ts feat(activity): per-viewer archive and hide 2026-05-25 20:19:44 +02:00
feedback.ts fix(feedback): stop exposing done_by user id in API responses 2026-05-25 13:54:07 +02:00
friends.ts Friends + friends-only visibility + blocking 2026-05-25 14:47:20 +02:00
index.ts refactor: Norwegian URL paths 2026-05-25 18:20:50 +02:00
invites.ts feat(invites): drop literal token after claim; cleaner UI 2026-05-25 20:47:33 +02:00
og.ts refactor: Norwegian URL paths 2026-05-25 18:20:50 +02:00
reset-password.ts feat(ops): emergency password-reset CLI + deployment docs 2026-05-25 20:04:57 +02:00
roles.ts Admin role, root/home URL split, activity permalinks 2026-05-25 13:23:13 +02:00
session.ts Scaffold Vinterliste — end-to-end encrypted winter activity list 2026-05-25 12:27:14 +02:00
settings.ts Self-registry toggle, invite links with attribution, first-user-admin 2026-05-25 13:45:32 +02:00
tags.ts feat(tags): moderators and admins can delete public tags 2026-05-25 17:57:33 +02:00
users.ts feat(activity): per-viewer archive and hide 2026-05-25 20:19:44 +02:00