feat: 10 quick wins — account deletion, health check, debug cleanup, UX polish, graceful shutdown
- backend/handlers/user/account.go: Wire DELETE /api/user/account to call anonymize_user() for registered users and delete_guest_user() for guests, with CardDAV contact cleanup - backend/handlers/user/profile_test.go: Add TestAccount_DeleteGuest and enhance TestAccount_Delete to verify anonymization results - backend/main.go: Add GET /api/health endpoint with DB ping and S3 status check; add HSTS and Referrer-Policy security headers; replace http.ListenAndServe with http.Server + graceful SIGTERM/SIGINT shutdown - frontend/routes/+layout.svelte: Replace alert() with toast notifications for email verification flow - frontend/routes/login/+page.svelte: Replace alert() with toast.info for social login prototype buttons - frontend/booking/BookingFlow.svelte: Remove 2 console.log debug calls; add cancellation policy note in Step 3; add timezone policy comment - frontend/ImageUpload.svelte: Comment out debug console.log - init-scripts/init-script.sql: Add delete_guest_user() SQL function - docs: Update README.md and Obsidian notes to reflect completed items
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import favicon from '$lib/assets/favicon.svg';
|
||||
import NavBar from '$lib/components/layout/NavBar.svelte';
|
||||
import { Toaster } from '$lib/components/ui/sonner/index.js';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@@ -30,15 +31,16 @@
|
||||
|
||||
// Verify email address
|
||||
async function verify_email() {
|
||||
alert('Verifying email address...');
|
||||
const loadingToast = toast.loading('Verifying email address...');
|
||||
const response = await fetch('/api/verify-email', {
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
toast.success('Email verified successfully!', { id: loadingToast });
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert('Failed to verify email address');
|
||||
toast.error('Failed to verify email address', { id: loadingToast });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
}
|
||||
|
||||
function handleSocialLogin(provider: string) {
|
||||
alert(`${provider} login clicked! (This is just a prototype)`);
|
||||
toast.info(`${provider} login coming soon`);
|
||||
}
|
||||
|
||||
// when password changes, re-compute strength
|
||||
|
||||
Reference in New Issue
Block a user