- Created /account/notifications/read endpoint secured by session middleware
- Ensured users can only mark their own notifications as read
- Updated dropdown links to point to /account/notifications/read?id={id}
- Improved notification security by matching user_id in DB update
- Added redirect flow to full notifications page after marking read
- Logged DB errors to assist debugging
12 lines
398 B
HTML
12 lines
398 B
HTML
{{ define "notifications_read" }}
|
|
<div class="container py-4">
|
|
<h2 class="mb-3">Notification</h2>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ .Notification.Title }}</h5>
|
|
<p class="card-text">{{ .Notification.Message }}</p>
|
|
<a href="/account/notifications" class="btn btn-primary mt-3">Back to Notifications</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }} |