- Add settlement category with handshake emoji (🤝) - Create settlement page for recording debt payments with user → user flow - Implement settlement detection and visual styling across all views - Add conditional "Settle Debts" button (hidden when balance is 0) - Style settlement payments distinctly in recent activity with large profile pictures - Add settlement flow styling in payments overview with green theme - Update backend validation and Mongoose schema for settlement category - Fix settlement receiver detection with proper user flow logic 🤝 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
13 lines
292 B
TypeScript
13 lines
292 B
TypeScript
import type { PageServerLoad } from './$types';
|
|
import { redirect } from '@sveltejs/kit';
|
|
|
|
export const load: PageServerLoad = async ({ locals }) => {
|
|
const auth = await locals.auth();
|
|
if (!auth || !auth.user) {
|
|
throw redirect(302, '/login');
|
|
}
|
|
|
|
return {
|
|
session: auth
|
|
};
|
|
}; |