Merge pull request #284 from jubnl/main

This commit is contained in:
Maurice
2026-04-01 20:43:37 +02:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { useAuthStore } from '../store/authStore'
import { useSettingsStore } from '../store/settingsStore' import { useSettingsStore } from '../store/settingsStore'
import { SUPPORTED_LANGUAGES, useTranslation } from '../i18n' import { SUPPORTED_LANGUAGES, useTranslation } from '../i18n'
import { authApi } from '../api/client' import { authApi } from '../api/client'
import { getApiErrorMessage } from '../types'
import { Plane, Eye, EyeOff, Mail, Lock, MapPin, Calendar, Package, User, Globe, Zap, Users, Wallet, Map, CheckSquare, BookMarked, FolderOpen, Route, Shield, KeyRound } from 'lucide-react' import { Plane, Eye, EyeOff, Mail, Lock, MapPin, Calendar, Package, User, Globe, Zap, Users, Wallet, Map, CheckSquare, BookMarked, FolderOpen, Route, Shield, KeyRound } from 'lucide-react'
interface AppConfig { interface AppConfig {
@@ -171,7 +172,7 @@ export default function LoginPage(): React.ReactElement {
setShowTakeoff(true) setShowTakeoff(true)
setTimeout(() => navigate('/dashboard'), 2600) setTimeout(() => navigate('/dashboard'), 2600)
} catch (err: unknown) { } catch (err: unknown) {
setError(err instanceof Error ? err.message : t('login.error')) setError(getApiErrorMessage(err, t('login.error')))
setIsLoading(false) setIsLoading(false)
} }
} }
+1 -1
View File
@@ -152,7 +152,7 @@ app.get('/uploads/photos/:filename', (req: Request, res: Response) => {
jwt.verify(token, process.env.JWT_SECRET || require('./config').JWT_SECRET); jwt.verify(token, process.env.JWT_SECRET || require('./config').JWT_SECRET);
} catch { } catch {
// Check if it's a share token // Check if it's a share token
const shareRow = db.prepare('SELECT id FROM share_tokens WHERE token = ?').get(token); const shareRow = addonDb.prepare('SELECT id FROM share_tokens WHERE token = ?').get(token);
if (!shareRow) return res.status(401).send('Authentication required'); if (!shareRow) return res.status(401).send('Authentication required');
} }
res.sendFile(resolved); res.sendFile(resolved);