Fix general settings route and req.user references
- Update frontend settings service to use correct /api/admin/settings/general route - Fix all req.user to req.admin references in adminSettings.js - Ensures settings can be saved without authentication errors
This commit is contained in:
@@ -346,17 +346,19 @@ export const EventsListPage: React.FC = () => {
|
||||
<Edit className="w-4 h-4" />
|
||||
View Details
|
||||
</button>
|
||||
<a
|
||||
href={event.share_link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="w-full text-left px-4 py-2 text-sm text-neutral-700 hover:bg-neutral-100 flex items-center gap-2"
|
||||
onClick={() => setActiveDropdown(null)}
|
||||
>
|
||||
<ExternalLink className="w-4 h-4" />
|
||||
View Gallery
|
||||
</a>
|
||||
{!event.is_archived && (
|
||||
{event.share_link ? (
|
||||
<a
|
||||
href={event.share_link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="w-full text-left px-4 py-2 text-sm text-neutral-700 hover:bg-neutral-100 flex items-center gap-2"
|
||||
onClick={() => setActiveDropdown(null)}
|
||||
>
|
||||
<ExternalLink className="w-4 h-4" />
|
||||
View Gallery
|
||||
</a>
|
||||
) : null}
|
||||
{!event.is_archived ? (
|
||||
<button
|
||||
onClick={() => {
|
||||
archiveMutation.mutate(event.id);
|
||||
@@ -367,8 +369,8 @@ export const EventsListPage: React.FC = () => {
|
||||
<Archive className="w-4 h-4" />
|
||||
Archive Event
|
||||
</button>
|
||||
)}
|
||||
{event.is_archived && (
|
||||
) : null}
|
||||
{event.is_archived ? (
|
||||
<button
|
||||
onClick={() => {
|
||||
toast.info('Download archive coming soon');
|
||||
@@ -379,7 +381,7 @@ export const EventsListPage: React.FC = () => {
|
||||
<Download className="w-4 h-4" />
|
||||
Download Archive
|
||||
</button>
|
||||
)}
|
||||
) : null}
|
||||
<button
|
||||
onClick={() => {
|
||||
if (confirm('Are you sure you want to delete this event?')) {
|
||||
|
||||
Reference in New Issue
Block a user