@lovelybunch/api 1.0.13 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +0,0 @@
1
- import { NextResponse } from 'next/server';
2
- import { updateUserProfile, loadUserSettings } from '@/lib/user-preferences';
3
- /**
4
- * GET /api/v1/user/profile
5
- * Get user profile information
6
- */
7
- export async function GET() {
8
- try {
9
- const settings = await loadUserSettings();
10
- return NextResponse.json({ success: true, data: settings.profile });
11
- }
12
- catch (error) {
13
- console.error('Failed to load user profile:', error);
14
- return NextResponse.json({ success: false, error: 'Failed to load user profile' }, { status: 500 });
15
- }
16
- }
17
- /**
18
- * PUT /api/v1/user/profile
19
- * Update user profile information
20
- */
21
- export async function PUT(request) {
22
- try {
23
- const profile = await request.json();
24
- const settings = await updateUserProfile(profile);
25
- return NextResponse.json({ success: true, data: settings.profile });
26
- }
27
- catch (error) {
28
- console.error('Failed to update user profile:', error);
29
- return NextResponse.json({ success: false, error: 'Failed to update user profile' }, { status: 500 });
30
- }
31
- }