Commit Graph

4 Commits

Author SHA1 Message Date
irrlicht d1a269db2f Frontend: Account-Bereich (GET /user/info, POST /user/delete)
- Account-Section nur sichtbar wenn eingeloggt; zeigt Nutzername und
  Mitglied-seit-Datum aus /user/info
- Konto loeschen in aufklappbarer Danger-Zone, Passwortbestaetigung
  plus zusaetzliche confirm()-Rueckfrage (unwiderruflich)
- nach Loeschung zurueck zur Login-Ansicht via refreshHeader

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 11:59:53 +02:00
irrlicht a47f41bbfa Frontend: Registrierung angebunden (POST /auth/newuser)
- Umschalter Login <-> Registrieren im Auth-Bereich
- Fehlerlisten-Anzeige ({"errors": [...]}) fuer newuser
- nach erfolgreicher Registrierung automatischer Login
- Logout setzt Ansicht auf Login zurueck

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 11:47:00 +02:00
irrlicht be8dbb4902 Implement left/right voting on entries
GET /entry/{pid}/interactions/{mode} now reads the vote tally and, for
mode=left/right (auth required), toggles the user's vote: new vote, repeat
same mode removes it, different mode switches. Returns {left, right,
selected}. A UNIQUE(uid, pid) constraint on the vote table prevents
duplicate votes. The JS frontend renders Links/Rechts buttons with live
counts under each entry.

This completes the voting feature that was left commented-out and broken
in the Flask version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 10:58:58 +02:00
irrlicht cb237c248e Rewrite backend in Go with JSON API and JS frontend
Reimplements the Flask app as a Go HTTP API (chi + modernc sqlite) with a
minimal vanilla-JS frontend in web/. Endpoints mirror the original Flask
routes but return JSON instead of HTML.

- auth: login/logout/register/sessioninfo/headerbar with crypto/rand tokens
- entry: paginated feed (single JOIN), create with image scaling
- user: profile, userinfo; delete still a stub
- requireAuth middleware passes uid via context
- notes/api.md documents the API and schema

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 10:17:02 +02:00