kamau1 commited on
Commit
295cd3a
·
1 Parent(s): c4f7e3e

remove redundant preferences updates endpoint

Browse files
docs/devlogs/browser/browserconsole.txt ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ chunk-276SZO74.js?v=23244404:21551 Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
2
+ core.ts:167 %cGET%c https://kamau1-swiftops-backend.hf.space/api/v1/auth/me
3
+ react-router-dom.js?v=23244404:4393 ⚠️ React Router Future Flag Warning: React Router will begin wrapping state updates in `React.startTransition` in v7. You can use the `v7_startTransition` future flag to opt-in early. For more information, see https://reactrouter.com/v6/upgrading/future#v7_starttransition.
4
+ warnOnce @ react-router-dom.js?v=23244404:4393
5
+ logDeprecation @ react-router-dom.js?v=23244404:4396
6
+ logV6DeprecationWarnings @ react-router-dom.js?v=23244404:4399
7
+ (anonymous) @ react-router-dom.js?v=23244404:5271
8
+ commitHookEffectListMount @ chunk-276SZO74.js?v=23244404:16915
9
+ commitPassiveMountOnFiber @ chunk-276SZO74.js?v=23244404:18156
10
+ commitPassiveMountEffects_complete @ chunk-276SZO74.js?v=23244404:18129
11
+ commitPassiveMountEffects_begin @ chunk-276SZO74.js?v=23244404:18119
12
+ commitPassiveMountEffects @ chunk-276SZO74.js?v=23244404:18109
13
+ flushPassiveEffectsImpl @ chunk-276SZO74.js?v=23244404:19490
14
+ flushPassiveEffects @ chunk-276SZO74.js?v=23244404:19447
15
+ (anonymous) @ chunk-276SZO74.js?v=23244404:19328
16
+ workLoop @ chunk-276SZO74.js?v=23244404:197
17
+ flushWork @ chunk-276SZO74.js?v=23244404:176
18
+ performWorkUntilDeadline @ chunk-276SZO74.js?v=23244404:384
19
+ react-router-dom.js?v=23244404:4393 ⚠️ React Router Future Flag Warning: Relative route resolution within Splat routes is changing in v7. You can use the `v7_relativeSplatPath` future flag to opt-in early. For more information, see https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath.
20
+ warnOnce @ react-router-dom.js?v=23244404:4393
21
+ logDeprecation @ react-router-dom.js?v=23244404:4396
22
+ logV6DeprecationWarnings @ react-router-dom.js?v=23244404:4402
23
+ (anonymous) @ react-router-dom.js?v=23244404:5271
24
+ commitHookEffectListMount @ chunk-276SZO74.js?v=23244404:16915
25
+ commitPassiveMountOnFiber @ chunk-276SZO74.js?v=23244404:18156
26
+ commitPassiveMountEffects_complete @ chunk-276SZO74.js?v=23244404:18129
27
+ commitPassiveMountEffects_begin @ chunk-276SZO74.js?v=23244404:18119
28
+ commitPassiveMountEffects @ chunk-276SZO74.js?v=23244404:18109
29
+ flushPassiveEffectsImpl @ chunk-276SZO74.js?v=23244404:19490
30
+ flushPassiveEffects @ chunk-276SZO74.js?v=23244404:19447
31
+ (anonymous) @ chunk-276SZO74.js?v=23244404:19328
32
+ workLoop @ chunk-276SZO74.js?v=23244404:197
33
+ flushWork @ chunk-276SZO74.js?v=23244404:176
34
+ performWorkUntilDeadline @ chunk-276SZO74.js?v=23244404:384
35
+ core.ts:167 GET https://kamau1-swiftops-backend.hf.space/api/v1/auth/me → 200 (500ms)
36
+ core.ts:117 ℹ️ [13:44:45] [COMPONENT] Dashboard component selected {role: 'platform_admin', componentName: 'PlatformAdminDashboard', componentExists: true}
37
+ core.ts:124 ℹ️ [13:44:45] [COMPONENT] PlatformAdminDashboard: Fetching platform admin dashboard data
38
+ core.ts:167 %cGET%c https://kamau1-swiftops-backend.hf.space/api/v1/clients?skip=0&limit=20
39
+ core.ts:167 %cGET%c https://kamau1-swiftops-backend.hf.space/api/v1/contractors?skip=0&limit=20
40
+ core.ts:167 %cGET%c https://kamau1-swiftops-backend.hf.space/api/v1/users?skip=0&limit=20
41
+ core.ts:167 %cGET%c https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences
42
+ core.ts:167 GET https://kamau1-swiftops-backend.hf.space/api/v1/clients → 200 (476ms)
43
+ core.ts:167 GET https://kamau1-swiftops-backend.hf.space/api/v1/contractors → 200 (476ms)
44
+ core.ts:167 GET https://kamau1-swiftops-backend.hf.space/api/v1/users → 200 (476ms)
45
+ core.ts:117 ℹ️ [13:44:45] [COMPONENT] PlatformAdminDashboard: Platform admin dashboard data fetched {orgsCount: 2, usersCount: 3, metrics: {…}}
46
+ core.ts:167 GET https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences → 200 (608ms)
47
+ core.ts:117 ℹ️ [13:44:47] [COMPONENT] ThemeToggle: Toggling theme {currentTheme: 'dark', effectiveTheme: 'dark', nextTheme: 'light'}
48
+ core.ts:117 ℹ️ [13:44:47] [DATA] Updating user preferences {theme: 'light', favoriteAppsJson: undefined}
49
+ core.ts:167 %cPUT%c https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences
50
+ core.ts:167 PUT https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences → 200 (625ms)
51
+ core.ts:117 ℹ️ [13:44:48] [DATA] User preferences updated successfully {updatedFields: Array(1), theme: undefined, favoriteAppsCount: 0, favoriteAppsJson: undefined}
52
+ core.ts:117 ℹ️ [13:44:48] [COMPONENT] ThemeToggle: Theme preference saved {nextTheme: 'light'}nextTheme: "light"[[Prototype]]: Object
53
+ chunk-276SZO74.js?v=23244404:521 Warning: Cannot update a component (`ForwardRef`) while rendering a different component (`ForwardRef`). To locate the bad setState() call inside `ForwardRef`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
54
+ at http://localhost:8080/node_modules/.vite/deps/sonner.js?v=23244404:269:17
55
+ at Toaster (http://localhost:8080/src/components/ui/sonner.tsx:24:23)
56
+ at Provider (http://localhost:8080/node_modules/.vite/deps/chunk-3RXG37ZK.js?v=23244404:38:15)
57
+ at TooltipProvider (http://localhost:8080/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=23244404:64:5)
58
+ at ThemeProvider (http://localhost:8080/src/contexts/ThemeProvider.tsx:29:33)
59
+ at UserPreferencesProvider (http://localhost:8080/src/contexts/UserPreferencesContext.tsx:28:43)
60
+ at QueryClientProvider (http://localhost:8080/node_modules/.vite/deps/@tanstack_react-query.js?v=23244404:2934:3)
61
+ at App (http://localhost:8080/src/App.tsx:144:35)
62
+ printWarning @ chunk-276SZO74.js?v=23244404:521
63
+ error @ chunk-276SZO74.js?v=23244404:505
64
+ warnAboutRenderPhaseUpdatesInDEV @ chunk-276SZO74.js?v=23244404:19793
65
+ scheduleUpdateOnFiber @ chunk-276SZO74.js?v=23244404:18546
66
+ dispatchSetState @ chunk-276SZO74.js?v=23244404:12403
67
+ (anonymous) @ sonner.js?v=23244404:277
68
+ (anonymous) @ sonner.js?v=23244404:68
69
+ dismiss @ sonner.js?v=23244404:68
70
+ (anonymous) @ sonner.js?v=23244404:272
71
+ basicStateReducer @ chunk-276SZO74.js?v=23244404:11703
72
+ updateReducer @ chunk-276SZO74.js?v=23244404:11794
73
+ updateState @ chunk-276SZO74.js?v=23244404:12021
74
+ useState @ chunk-276SZO74.js?v=23244404:12753
75
+ useState @ chunk-ZMLY2J2T.js?v=23244404:1066
76
+ (anonymous) @ sonner.js?v=23244404:269
77
+ renderWithHooks @ chunk-276SZO74.js?v=23244404:11548
78
+ updateForwardRef @ chunk-276SZO74.js?v=23244404:14325
79
+ beginWork @ chunk-276SZO74.js?v=23244404:15946
80
+ beginWork$1 @ chunk-276SZO74.js?v=23244404:19753
81
+ performUnitOfWork @ chunk-276SZO74.js?v=23244404:19198
82
+ workLoopSync @ chunk-276SZO74.js?v=23244404:19137
83
+ renderRootSync @ chunk-276SZO74.js?v=23244404:19116
84
+ performConcurrentWorkOnRoot @ chunk-276SZO74.js?v=23244404:18678
85
+ workLoop @ chunk-276SZO74.js?v=23244404:197
86
+ flushWork @ chunk-276SZO74.js?v=23244404:176
87
+ performWorkUntilDeadline @ chunk-276SZO74.js?v=23244404:384
88
+ core.ts:117 ℹ️ [13:45:16] [COMPONENT] AppLauncher: Entered edit mode {currentFavorites: Array(4), availableAppsCount: 8}
89
+ core.ts:117 ℹ️ [13:45:19] [COMPONENT] AppLauncher: Saving favorite apps {savedFavorites: Array(5), originalFavorites: Array(0), favoritesJson: '["dashboard","organizations","users","activity","settings"]'}
90
+ core.ts:117 ℹ️ [13:45:19] [DATA] Updating user preferences {favorite_apps: Array(5), favoriteAppsJson: '["dashboard","organizations","users","activity","settings"]'}
91
+ core.ts:167 %cPUT%c https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences
92
+ core.ts:167 PUT https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences → 200 (682ms)
93
+ core.ts:117 ℹ️ [13:45:20] [DATA] User preferences updated successfully {updatedFields: Array(1), theme: undefined, favoriteAppsCount: 0, favoriteAppsJson: undefined}
docs/{hflogs → devlogs/server}/builderrors.txt RENAMED
File without changes
docs/devlogs/server/preferences_update_fix.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # User Preferences Update Bug - Root Cause & Fix
2
+
3
+ ## Issue Summary
4
+ User preferences updates (theme, favorite_apps) were not being saved to the database despite the API returning 200 OK responses.
5
+
6
+ ## Root Cause
7
+
8
+ ### Duplicate Route Definitions
9
+ The `auth.py` file had **TWO different endpoints** with the **same route path**:
10
+
11
+ 1. **OLD Endpoint (Line 847)** - `PUT /me/preferences`
12
+ - Function: `update_user_preferences()`
13
+ - Input: Generic `dict`
14
+ - Output: `UserProfile` (no preference fields)
15
+ - **Only handled**: `last_active_project_id`
16
+ - **Ignored**: `theme`, `favorite_apps`, and all other preference fields
17
+
18
+ 2. **NEW Endpoint (Line 1242)** - `PUT /me/preferences`
19
+ - Function: `update_my_preferences()`
20
+ - Input: `UserPreferencesUpdate` schema
21
+ - Output: `UserPreferencesResponse` (includes all preference fields)
22
+ - **Handles**: `favorite_apps`, `theme`, `language`, notifications, etc.
23
+
24
+ ### Why It Failed
25
+ When FastAPI registers routes, **only the first matching route is registered**. The old endpoint (line 847) was being called for all `/me/preferences` PUT requests, which:
26
+ - Accepted the request body as a dict
27
+ - Only looked for `last_active_project_id`
28
+ - **Silently ignored** `theme`, `favorite_apps`, and other fields
29
+ - Returned `UserProfile` without preference data
30
+ - This is why the browser console showed: `favoriteAppsCount: 0, favoriteAppsJson: undefined`
31
+
32
+ ## Evidence from Logs
33
+
34
+ ### Browser Console (browserconsole.txt)
35
+ ```
36
+ Line 48: [DATA] Updating user preferences {theme: 'light', favoriteAppsJson: undefined}
37
+ Line 49: PUT https://kamau1-swiftops-backend.hf.space/api/v1/auth/me/preferences
38
+ Line 50: PUT .../api/v1/auth/me/preferences → 200 (625ms)
39
+ Line 51: [DATA] User preferences updated successfully {updatedFields: Array(1), theme: undefined, favoriteAppsCount: 0, favoriteAppsJson: undefined}
40
+ ```
41
+
42
+ The request succeeded (200 OK) but the response didn't contain the updated data.
43
+
44
+ ### Server Logs (runtimeerror.txt)
45
+ ```
46
+ Line 35: PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
47
+ Line 181: PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
48
+ Line 260: PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
49
+ Line 264: PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
50
+ ```
51
+
52
+ Multiple successful requests, but the old endpoint was being called.
53
+
54
+ ## The Fix
55
+
56
+ ### Changes Made
57
+
58
+ **1. Added `last_active_project_id` to `UserPreferencesUpdate` schema**
59
+ - File: `src/app/schemas/user_preferences.py`
60
+ - Added the field so the preferences endpoint can handle project context updates
61
+
62
+ **2. Enhanced the preferences endpoint with project validation**
63
+ - File: `src/app/api/v1/auth.py` (line 1242+)
64
+ - Added validation logic for `last_active_project_id`:
65
+ - Prevents platform admins from setting project context
66
+ - Verifies user is assigned to the project
67
+ - Verifies project exists and is active
68
+ - Updated field exclusion list to skip validated fields
69
+
70
+ **3. Removed the old duplicate endpoint entirely**
71
+ - File: `src/app/api/v1/auth.py` (previously line 847-1020)
72
+ - **Deleted** the old `PUT /me/active-project` endpoint
73
+ - No longer needed since the new endpoint handles everything
74
+
75
+ ### Result: Single Unified Endpoint
76
+
77
+ Now there is **ONE endpoint** that handles **ALL** user preference updates:
78
+
79
+ **`PUT /api/v1/auth/me/preferences`**
80
+ - Input: `UserPreferencesUpdate` schema
81
+ - Output: `UserPreferencesResponse`
82
+ - Handles:
83
+ - ✅ `favorite_apps` - Array of app codes (max 6, role-validated)
84
+ - ✅ `theme` - 'light', 'dark', or 'auto'
85
+ - ✅ `language` - Language code
86
+ - ✅ `last_active_project_id` - Project context (validated)
87
+ - ✅ `email_notifications` - Boolean
88
+ - ✅ `push_notifications` - Boolean
89
+ - ✅ `sms_notifications` - Boolean
90
+ - ✅ `dashboard_widgets` - Array of widget codes
91
+ - ✅ `default_tickets_view` - 'list', 'kanban', or 'calendar'
92
+ - ✅ All other preference fields
93
+
94
+ ### Response Format
95
+ The endpoint now returns `UserPreferencesResponse` which includes:
96
+ ```json
97
+ {
98
+ "id": "uuid",
99
+ "user_id": "uuid",
100
+ "favorite_apps": ["dashboard", "organizations", "users", "activity"],
101
+ "theme": "light",
102
+ "language": "en",
103
+ "email_notifications": true,
104
+ "last_active_project_id": "uuid",
105
+ ...
106
+ }
107
+ ```
108
+
109
+ ## Testing Required
110
+
111
+ 1. **Restart the backend server** to load the updated route
112
+ 2. **Test theme updates**:
113
+ - Toggle theme from dark to light
114
+ - Verify database `user_preferences.theme` column updates
115
+ - Verify API response contains updated theme
116
+
117
+ 3. **Test favorite apps updates**:
118
+ - Add/remove favorite apps
119
+ - Verify database `user_preferences.favorite_apps` column updates
120
+ - Verify API response contains updated favorite_apps array
121
+
122
+ 4. **Test project context updates**:
123
+ - Switch active project
124
+ - Verify database `user_preferences.last_active_project_id` column updates
125
+ - Verify API response contains updated project ID
126
+
127
+ ## Migration Notes
128
+
129
+ ### Breaking Changes
130
+ - **Removed**: `PUT /me/active-project` endpoint (was never in production)
131
+ - **Use instead**: `PUT /me/preferences` for all preference updates
132
+
133
+ ### Unified Endpoint
134
+ - **Route**: `PUT /api/v1/auth/me/preferences`
135
+ - **Purpose**: Update all user preferences in one place
136
+ - **Supports**: All preference fields including `last_active_project_id`
137
+
138
+ ## Database Schema
139
+ The fix doesn't require any database changes. The `user_preferences` table already has all the necessary columns:
140
+ - `favorite_apps` (JSONB array)
141
+ - `theme` (VARCHAR)
142
+ - `language` (VARCHAR)
143
+ - `email_notifications` (BOOLEAN)
144
+ - etc.
145
+
146
+ The issue was purely in the routing layer.
docs/devlogs/server/runtimeerror.txt ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ===== Application Startup at 2025-11-20 12:42:52 =====
2
+
3
+ INFO: Started server process [7]
4
+ INFO: Waiting for application startup.
5
+ INFO: 2025-11-20T12:47:32 - app.main: ============================================================
6
+ INFO: 2025-11-20T12:47:32 - app.main: 🚀 SwiftOps API v1.0.0 | PRODUCTION
7
+ INFO: 2025-11-20T12:47:32 - app.main: ============================================================
8
+ INFO: 2025-11-20T12:47:32 - app.main: 📦 Database:
9
+ INFO: 2025-11-20T12:47:32 - app.main: ✓ Connected | 44 tables | 3 users
10
+ INFO: 2025-11-20T12:47:32 - app.main: 💾 Cache & Sessions:
11
+ INFO: 2025-11-20T12:47:33 - app.services.otp_service: ✅ OTP Service initialized with Redis storage
12
+ INFO: 2025-11-20T12:47:34 - app.main: ✓ Redis: Connected
13
+ INFO: 2025-11-20T12:47:34 - app.main: 🔌 External Services:
14
+ INFO: 2025-11-20T12:47:34 - app.main: ✓ Cloudinary: Connected
15
+ INFO: 2025-11-20T12:47:34 - app.main: ✓ Resend: Configured
16
+ INFO: 2025-11-20T12:47:34 - app.main: ✓ WASender: Connected
17
+ INFO: 2025-11-20T12:47:34 - app.main: ✓ Supabase: Connected | 6 buckets
18
+ INFO: 2025-11-20T12:47:34 - app.main: ============================================================
19
+ INFO: 2025-11-20T12:47:34 - app.main: ✅ Startup complete | Ready to serve requests
20
+ INFO: 2025-11-20T12:47:34 - app.main: ============================================================
21
+ INFO: Application startup complete.
22
+ INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
23
+ INFO: 10.16.18.108:34996 - "GET /health HTTP/1.1" 200 OK
24
+ INFO: 10.16.39.215:29377 - "GET /health HTTP/1.1" 200 OK
25
+ INFO: 10.16.24.73:36238 - "GET /health HTTP/1.1" 200 OK
26
+ INFO: 10.16.18.108:29704 - "GET /health HTTP/1.1" 200 OK
27
+ INFO: 10.16.24.73:1205 - "GET /health HTTP/1.1" 200 OK
28
+ INFO: 10.16.44.29:37905 - "GET /health HTTP/1.1" 200 OK
29
+ INFO: 10.16.18.108:12797 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
30
+ INFO: 10.16.18.108:12797 - "GET /api/v1/projects?skip=0&limit=20 HTTP/1.1" 200 OK
31
+ INFO: 10.16.44.29:37905 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
32
+ INFO: 10.16.24.73:51087 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
33
+ INFO: 10.16.24.73:10099 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
34
+ INFO: 10.16.24.73:51087 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
35
+ INFO: 10.16.39.215:6304 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
36
+ INFO: 10.16.44.29:28497 - "GET /health HTTP/1.1" 200 OK
37
+ INFO: 10.16.39.215:19944 - "GET /health HTTP/1.1" 200 OK
38
+ INFO: 10.16.18.108:54475 - "GET /health HTTP/1.1" 200 OK
39
+ INFO: 10.16.24.73:10917 - "GET /health HTTP/1.1" 200 OK
40
+ INFO: 10.16.39.215:19340 - "GET /health HTTP/1.1" 200 OK
41
+ INFO: 10.16.18.108:64661 - "GET /health HTTP/1.1" 200 OK
42
+ INFO: 10.16.8.187:41203 - "GET /health HTTP/1.1" 200 OK
43
+ INFO: 10.16.8.187:39603 - "GET /health HTTP/1.1" 200 OK
44
+ INFO: 10.16.8.187:33789 - "GET /health HTTP/1.1" 200 OK
45
+ INFO: 10.16.39.215:19599 - "GET /health HTTP/1.1" 200 OK
46
+ INFO: 10.16.8.187:46494 - "GET /health HTTP/1.1" 200 OK
47
+ INFO: 10.16.24.73:2015 - "GET /health HTTP/1.1" 200 OK
48
+ INFO: 10.16.39.215:46963 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
49
+ INFO: 10.16.8.187:38179 - "GET /api/v1/projects?skip=0&limit=20 HTTP/1.1" 200 OK
50
+ INFO: 10.16.39.215:63032 - "GET /health HTTP/1.1" 200 OK
51
+ INFO: 10.16.18.108:55087 - "GET / HTTP/1.1" 200 OK
52
+ INFO: 10.16.18.108:49029 - "GET /health HTTP/1.1" 200 OK
53
+ INFO: 10.16.18.108:41791 - "GET /health HTTP/1.1" 200 OK
54
+ INFO: 10.16.39.215:34438 - "GET /health HTTP/1.1" 200 OK
55
+ INFO: 10.16.39.215:41691 - "GET /health HTTP/1.1" 200 OK
56
+ INFO: 10.16.39.215:38553 - "GET /health HTTP/1.1" 200 OK
57
+ INFO: 10.16.44.15:60729 - "GET /health HTTP/1.1" 200 OK
58
+ INFO: 10.16.24.73:13156 - "GET /health HTTP/1.1" 200 OK
59
+ INFO: 10.16.24.73:1582 - "GET /health HTTP/1.1" 200 OK
60
+ INFO: 10.16.24.73:31594 - "GET /health HTTP/1.1" 200 OK
61
+ INFO: 10.16.18.108:15884 - "GET /health HTTP/1.1" 200 OK
62
+ INFO: 10.16.24.73:64198 - "GET /health HTTP/1.1" 200 OK
63
+ INFO: 10.16.39.215:39159 - "GET /health HTTP/1.1" 200 OK
64
+ INFO: 10.16.39.215:17935 - "GET /health HTTP/1.1" 200 OK
65
+ INFO: 10.16.18.108:34447 - "GET /health HTTP/1.1" 200 OK
66
+ INFO: 10.16.24.73:2012 - "GET /health HTTP/1.1" 200 OK
67
+ INFO: 10.16.18.108:58289 - "GET /health HTTP/1.1" 200 OK
68
+ INFO: 10.16.39.215:1107 - "GET /health HTTP/1.1" 200 OK
69
+ INFO: 10.16.24.73:26545 - "GET /health HTTP/1.1" 200 OK
70
+ INFO: 10.16.39.215:13357 - "GET /health HTTP/1.1" 200 OK
71
+ INFO: 10.16.24.73:5880 - "GET /health HTTP/1.1" 200 OK
72
+ INFO: 10.16.24.73:5880 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
73
+ INFO: 10.16.18.108:12330 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
74
+ INFO: 10.16.44.15:44865 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
75
+ INFO: 10.16.8.187:10790 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
76
+ INFO: 10.16.44.15:44865 - "GET /api/v1/projects?skip=0&limit=20 HTTP/1.1" 200 OK
77
+ INFO: 10.16.39.215:11238 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
78
+ INFO: 10.16.8.187:53615 - "GET /health HTTP/1.1" 200 OK
79
+ INFO: 10.16.8.187:3674 - "GET /health HTTP/1.1" 200 OK
80
+ INFO: 10.16.39.215:60292 - "GET /health HTTP/1.1" 200 OK
81
+ INFO: 10.16.8.187:29505 - "GET /health HTTP/1.1" 200 OK
82
+ INFO: 10.16.18.108:21204 - "GET /health HTTP/1.1" 200 OK
83
+ INFO: 10.16.18.108:29996 - "GET /api/v1/projects?skip=0&limit=20 HTTP/1.1" 200 OK
84
+ INFO: 10.16.44.15:27807 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
85
+ INFO: 10.16.24.73:1170 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
86
+ INFO: 10.16.44.15:2025 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
87
+ INFO: 10.16.44.15:2025 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
88
+ INFO: 10.16.18.108:52495 - "GET /health HTTP/1.1" 200 OK
89
+ INFO: 10.16.44.15:65173 - "GET /health HTTP/1.1" 200 OK
90
+ INFO: 10.16.18.108:57649 - "GET /health HTTP/1.1" 200 OK
91
+ INFO: 10.16.8.187:49796 - "GET /health HTTP/1.1" 200 OK
92
+ INFO: 10.16.44.15:9802 - "GET /health HTTP/1.1" 200 OK
93
+ INFO: 10.16.8.187:28153 - "GET /health HTTP/1.1" 200 OK
94
+ INFO: 10.16.18.108:1285 - "GET /health HTTP/1.1" 200 OK
95
+ INFO: 10.16.8.187:21287 - "GET /health HTTP/1.1" 200 OK
96
+ INFO: 10.16.44.15:65355 - "GET /health HTTP/1.1" 200 OK
97
+ INFO: 10.16.8.187:41750 - "GET /health HTTP/1.1" 200 OK
98
+ INFO: 10.16.18.108:26955 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
99
+ INFO: 10.16.44.15:46798 - "GET /api/v1/projects?skip=0&limit=20 HTTP/1.1" 200 OK
100
+ INFO: 10.16.8.187:63047 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
101
+ INFO: 10.16.18.108:18824 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
102
+ INFO: 10.16.44.15:46798 - "GET /health HTTP/1.1" 200 OK
103
+ INFO: 10.16.44.15:46798 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
104
+ INFO: 10.16.24.73:48228 - "GET /health HTTP/1.1" 200 OK
105
+ INFO: 10.16.39.215:54333 - "GET /health HTTP/1.1" 200 OK
106
+ INFO: 2025-11-20T13:19:07 - app.core.supabase_auth: Session refreshed successfully
107
+ INFO: 2025-11-20T13:19:07 - app.api.v1.auth: ✅ Token refreshed successfully for: brea.0@nembors.com
108
+ INFO: 10.16.44.15:64542 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
109
+ INFO: 10.16.39.215:54333 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
110
+ INFO: 10.16.39.215:54333 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
111
+ INFO: 10.16.18.108:48367 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
112
+ INFO: 10.16.39.215:28145 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
113
+ INFO: 10.16.18.108:40232 - "GET /health HTTP/1.1" 200 OK
114
+ INFO: 10.16.24.73:3721 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
115
+ INFO: 10.16.39.215:58168 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
116
+ INFO: 10.16.39.215:58168 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
117
+ INFO: 10.16.24.73:3721 - "GET /health HTTP/1.1" 200 OK
118
+ INFO: 10.16.44.15:4157 - "GET /health HTTP/1.1" 200 OK
119
+ INFO: 10.16.44.15:56622 - "GET /health HTTP/1.1" 200 OK
120
+ INFO: 10.16.24.73:35762 - "GET /health HTTP/1.1" 200 OK
121
+ INFO: 10.16.24.73:35762 - "GET /health HTTP/1.1" 200 OK
122
+ INFO: 10.16.8.187:29406 - "GET /health HTTP/1.1" 200 OK
123
+ INFO: 10.16.44.15:54442 - "GET /health HTTP/1.1" 200 OK
124
+ INFO: 10.16.44.15:57865 - "GET /health HTTP/1.1" 200 OK
125
+ INFO: 2025-11-20T13:20:26 - app.services.audit_service: Audit log created: logout on auth by system
126
+ INFO: 2025-11-20T13:20:26 - app.api.v1.auth: User logged out: 451harlequin@2200freefonts.com
127
+ INFO: 10.16.39.215:6066 - "POST /api/v1/auth/logout HTTP/1.1" 200 OK
128
+ INFO: 2025-11-20T13:20:30 - app.core.supabase_auth: User signed in successfully: brea.0@nembors.com
129
+ INFO: 2025-11-20T13:20:30 - app.services.audit_service: Audit log created: login on auth by brea.0@nembors.com
130
+ INFO: 2025-11-20T13:20:30 - app.api.v1.auth: User logged in successfully: brea.0@nembors.com
131
+ INFO: 10.16.8.187:55557 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
132
+ INFO: 10.16.18.108:28896 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
133
+ INFO: 10.16.8.187:55557 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
134
+ INFO: 10.16.18.108:28896 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
135
+ INFO: 10.16.39.215:24474 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
136
+ INFO: 10.16.39.215:24474 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
137
+ INFO: 10.16.39.215:24432 - "GET /health HTTP/1.1" 200 OK
138
+ INFO: 10.16.8.187:27809 - "GET /health HTTP/1.1" 200 OK
139
+ INFO: 10.16.39.215:18878 - "GET /health HTTP/1.1" 200 OK
140
+ INFO: 10.16.39.215:54879 - "GET /health HTTP/1.1" 200 OK
141
+ INFO: 10.16.18.108:31107 - "GET /health HTTP/1.1" 200 OK
142
+ INFO: 10.16.44.15:55708 - "GET /health HTTP/1.1" 200 OK
143
+ INFO: 10.16.8.187:26650 - "GET /health HTTP/1.1" 200 OK
144
+ INFO: 10.16.8.187:48590 - "GET /health HTTP/1.1" 200 OK
145
+ INFO: 10.16.44.15:1070 - "GET /health HTTP/1.1" 200 OK
146
+ INFO: 10.16.8.187:17863 - "GET /health HTTP/1.1" 200 OK
147
+ INFO: 10.16.18.108:5590 - "GET /health HTTP/1.1" 200 OK
148
+ INFO: 10.16.39.215:49888 - "GET /health HTTP/1.1" 200 OK
149
+ INFO: 10.16.8.187:12359 - "GET /health HTTP/1.1" 200 OK
150
+ INFO: 10.16.39.215:56202 - "GET /health HTTP/1.1" 200 OK
151
+ INFO: 10.16.44.15:49054 - "GET /health HTTP/1.1" 200 OK
152
+ INFO: 10.16.24.73:41925 - "GET /health HTTP/1.1" 200 OK
153
+ INFO: 10.16.18.108:20045 - "GET /health HTTP/1.1" 200 OK
154
+ INFO: 10.16.44.15:14811 - "GET /health HTTP/1.1" 200 OK
155
+ INFO: 10.16.44.15:25953 - "GET /health HTTP/1.1" 200 OK
156
+ INFO: 10.16.39.215:29366 - "GET /health HTTP/1.1" 200 OK
157
+ INFO: 10.16.18.108:30078 - "GET /health HTTP/1.1" 200 OK
158
+ INFO: 10.16.39.215:49906 - "GET /health HTTP/1.1" 200 OK
159
+ INFO: 10.16.18.108:1533 - "GET /health HTTP/1.1" 200 OK
160
+ INFO: 10.16.8.187:10280 - "GET /health HTTP/1.1" 200 OK
161
+ INFO: 10.16.8.187:18296 - "GET /health HTTP/1.1" 200 OK
162
+ INFO: 10.16.24.73:1784 - "GET /health HTTP/1.1" 200 OK
163
+ INFO: 10.16.8.187:37416 - "GET /health HTTP/1.1" 200 OK
164
+ INFO: 10.16.44.15:45826 - "GET /health HTTP/1.1" 200 OK
165
+ INFO: 10.16.24.73:40526 - "GET /health HTTP/1.1" 200 OK
166
+ INFO: 10.16.39.215:35169 - "GET /health HTTP/1.1" 200 OK
167
+ INFO: 10.16.44.15:32750 - "GET /health HTTP/1.1" 200 OK
168
+ INFO: 10.16.39.215:40781 - "GET /health HTTP/1.1" 200 OK
169
+ INFO: 10.16.44.15:20373 - "GET /health HTTP/1.1" 200 OK
170
+ INFO: 10.16.39.215:7508 - "GET /health HTTP/1.1" 200 OK
171
+ INFO: 10.16.44.15:64837 - "GET /health HTTP/1.1" 200 OK
172
+ INFO: 10.16.24.73:25070 - "GET /health HTTP/1.1" 200 OK
173
+ INFO: 10.16.18.108:13229 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
174
+ INFO: 10.16.24.73:25070 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
175
+ INFO: 10.16.24.73:55491 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
176
+ INFO: 10.16.44.15:38323 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
177
+ INFO: 10.16.39.215:1386 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
178
+ INFO: 10.16.39.215:37405 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
179
+ INFO: 10.16.44.15:38323 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
180
+ INFO: 10.16.24.73:8898 - "GET /health HTTP/1.1" 200 OK
181
+ INFO: 10.16.39.215:5661 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
182
+ INFO: 10.16.8.187:65367 - "GET /health HTTP/1.1" 200 OK
183
+ INFO: 10.16.8.187:6970 - "GET /health HTTP/1.1" 200 OK
184
+ INFO: 10.16.39.215:11563 - "GET /health HTTP/1.1" 200 OK
185
+ INFO: 10.16.24.73:15240 - "GET /health HTTP/1.1" 200 OK
186
+ INFO: 10.16.8.187:23095 - "GET /health HTTP/1.1" 200 OK
187
+ INFO: 10.16.18.108:10701 - "GET /health HTTP/1.1" 200 OK
188
+ INFO: 10.16.44.15:62332 - "GET /health HTTP/1.1" 200 OK
189
+ INFO: 10.16.39.215:7966 - "GET /health HTTP/1.1" 200 OK
190
+ INFO: 10.16.8.187:17013 - "GET /health HTTP/1.1" 200 OK
191
+ INFO: 10.16.18.108:24283 - "GET /health HTTP/1.1" 200 OK
192
+ INFO: 10.16.8.187:64498 - "GET /health HTTP/1.1" 200 OK
193
+ INFO: 10.16.24.73:34365 - "GET /health HTTP/1.1" 200 OK
194
+ INFO: 10.16.44.15:56498 - "GET /health HTTP/1.1" 200 OK
195
+ INFO: 10.16.18.108:19740 - "GET /health HTTP/1.1" 200 OK
196
+ INFO: 10.16.18.108:30871 - "GET /health HTTP/1.1" 200 OK
197
+ INFO: 10.16.24.73:9003 - "GET /health HTTP/1.1" 200 OK
198
+ INFO: 10.16.39.215:4579 - "GET /health HTTP/1.1" 200 OK
199
+ INFO: 10.16.18.108:44952 - "GET /health HTTP/1.1" 200 OK
200
+ INFO: 10.16.39.215:45994 - "GET /health HTTP/1.1" 200 OK
201
+ INFO: 10.16.44.15:23003 - "GET /health HTTP/1.1" 200 OK
202
+ INFO: 10.16.39.215:55557 - "GET /health HTTP/1.1" 200 OK
203
+ INFO: 10.16.24.73:14072 - "GET /health HTTP/1.1" 200 OK
204
+ INFO: 10.16.18.108:9771 - "GET /health HTTP/1.1" 200 OK
205
+ INFO: 10.16.24.73:27437 - "GET /health HTTP/1.1" 200 OK
206
+ INFO: 10.16.8.187:8540 - "GET /health HTTP/1.1" 200 OK
207
+ INFO: 10.16.18.108:18153 - "GET /health HTTP/1.1" 200 OK
208
+ INFO: 10.16.24.73:10125 - "GET /health HTTP/1.1" 200 OK
209
+ INFO: 10.16.24.73:10125 - "GET /health HTTP/1.1" 200 OK
210
+ INFO: 10.16.39.215:18217 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
211
+ INFO: 10.16.8.187:11050 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
212
+ INFO: 10.16.39.215:25314 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
213
+ INFO: 10.16.39.215:25314 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
214
+ INFO: 10.16.44.15:6762 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
215
+ INFO: 10.16.24.73:10125 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
216
+ INFO: 10.16.18.108:6710 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
217
+ INFO: 10.16.44.15:55095 - "GET /health HTTP/1.1" 200 OK
218
+ INFO: 10.16.18.108:11752 - "GET /health HTTP/1.1" 200 OK
219
+ INFO: 10.16.24.73:17553 - "GET /health HTTP/1.1" 200 OK
220
+ INFO: 10.16.39.215:46755 - "GET /health HTTP/1.1" 200 OK
221
+ INFO: 10.16.39.215:46755 - "GET /health HTTP/1.1" 200 OK
222
+ INFO: 10.16.8.187:3080 - "GET /health HTTP/1.1" 200 OK
223
+ INFO: 10.16.39.215:30363 - "GET /health HTTP/1.1" 200 OK
224
+ INFO: 10.16.8.187:53578 - "GET /health HTTP/1.1" 200 OK
225
+ INFO: 10.16.18.108:48098 - "GET /health HTTP/1.1" 200 OK
226
+ INFO: 10.16.8.187:53578 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
227
+ INFO: 10.16.18.108:48098 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
228
+ INFO: 10.16.24.73:53458 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
229
+ INFO: 10.16.18.108:48098 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
230
+ INFO: 10.16.39.215:21663 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
231
+ INFO: 10.16.18.108:12284 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
232
+ INFO: 10.16.8.187:53578 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
233
+ INFO: 10.16.39.215:56231 - "GET /health HTTP/1.1" 200 OK
234
+ INFO: 10.16.18.108:16041 - "GET /health HTTP/1.1" 200 OK
235
+ INFO: 10.16.44.15:8790 - "GET /health HTTP/1.1" 200 OK
236
+ INFO: 10.16.24.73:59345 - "GET /health HTTP/1.1" 200 OK
237
+ INFO: 10.16.0.166:8800 - "GET /health HTTP/1.1" 200 OK
238
+ INFO: 10.16.39.215:28341 - "GET /health HTTP/1.1" 200 OK
239
+ INFO: 10.16.39.215:35381 - "GET /health HTTP/1.1" 200 OK
240
+ INFO: 10.16.24.73:62072 - "GET /health HTTP/1.1" 200 OK
241
+ INFO: 10.16.0.166:64252 - "GET /health HTTP/1.1" 200 OK
242
+ INFO: 10.16.0.166:53341 - "GET /health HTTP/1.1" 200 OK
243
+ INFO: 10.16.18.108:31403 - "GET /health HTTP/1.1" 200 OK
244
+ INFO: 10.16.0.166:47127 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
245
+ INFO: 10.16.0.166:47127 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
246
+ INFO: 10.16.18.108:31403 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
247
+ INFO: 10.16.0.166:22403 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
248
+ INFO: 10.16.0.166:55919 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
249
+ INFO: 10.16.24.73:14525 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
250
+ INFO: 10.16.18.108:31403 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
251
+ INFO: 10.16.0.166:55919 - "GET /health HTTP/1.1" 200 OK
252
+ INFO: 10.16.24.73:25857 - "GET /health HTTP/1.1" 200 OK
253
+ INFO: 10.16.24.73:10459 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
254
+ INFO: 10.16.24.73:10459 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
255
+ INFO: 10.16.24.73:25857 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
256
+ INFO: 10.16.24.73:63356 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
257
+ INFO: 10.16.8.187:12441 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
258
+ INFO: 10.16.39.215:52411 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
259
+ INFO: 10.16.8.187:12441 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
260
+ INFO: 10.16.0.166:20902 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
261
+ INFO: 10.16.8.187:35640 - "GET /health HTTP/1.1" 200 OK
262
+ INFO: 10.16.24.73:44629 - "GET /health HTTP/1.1" 200 OK
263
+ INFO: 10.16.18.108:51620 - "GET /health HTTP/1.1" 200 OK
264
+ INFO: 10.16.8.187:38871 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
265
+ INFO: 10.16.44.15:14544 - "GET /health HTTP/1.1" 200 OK
266
+ INFO: 10.16.24.73:39200 - "GET /health HTTP/1.1" 200 OK
267
+ INFO: 10.16.24.73:26666 - "GET /health HTTP/1.1" 200 OK
268
+ INFO: 10.16.24.73:63801 - "GET /health HTTP/1.1" 200 OK
269
+ INFO: 10.16.0.166:20534 - "GET /health HTTP/1.1" 200 OK
270
+ INFO: 10.16.18.108:36097 - "GET /health HTTP/1.1" 200 OK
271
+ INFO: 10.16.24.73:25733 - "GET /health HTTP/1.1" 200 OK
272
+
docs/hflogs/runtimeerror.txt DELETED
@@ -1,657 +0,0 @@
1
- ===== Application Startup at 2025-11-19 17:58:54 =====
2
-
3
- INFO: Started server process [7]
4
- INFO: Waiting for application startup.
5
- INFO: 2025-11-19T17:59:06 - app.main: ============================================================
6
- INFO: 2025-11-19T17:59:06 - app.main: 🚀 SwiftOps API v1.0.0 | PRODUCTION
7
- INFO: 2025-11-19T17:59:06 - app.main: ============================================================
8
- INFO: 2025-11-19T17:59:06 - app.main: 📦 Database:
9
- INFO: 2025-11-19T17:59:10 - app.main: ✓ Connected | 44 tables | 15 users
10
- INFO: 2025-11-19T17:59:10 - app.main: 💾 Cache & Sessions:
11
- INFO: 2025-11-19T17:59:10 - app.services.otp_service: ✅ OTP Service initialized with Redis storage
12
- INFO: 2025-11-19T17:59:11 - app.main: ✓ Redis: Connected
13
- INFO: 2025-11-19T17:59:11 - app.main: 🔌 External Services:
14
- INFO: 2025-11-19T17:59:12 - app.main: ✓ Cloudinary: Connected
15
- INFO: 2025-11-19T17:59:12 - app.main: ✓ Resend: Configured
16
- INFO: 2025-11-19T17:59:12 - app.main: ✓ WASender: Connected
17
- INFO: 2025-11-19T17:59:12 - app.main: ✓ Supabase: Connected | 6 buckets
18
- INFO: 2025-11-19T17:59:12 - app.main: ============================================================
19
- INFO: 2025-11-19T17:59:12 - app.main: ✅ Startup complete | Ready to serve requests
20
- INFO: 2025-11-19T17:59:12 - app.main: ============================================================
21
- INFO: Application startup complete.
22
- INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
23
- INFO: 10.16.9.217:28341 - "GET /health HTTP/1.1" 200 OK
24
- INFO: 10.16.32.101:46282 - "GET /health HTTP/1.1" 200 OK
25
- INFO: 10.16.24.73:6336 - "GET /health HTTP/1.1" 200 OK
26
- INFO: 10.16.24.73:15143 - "GET /health HTTP/1.1" 200 OK
27
- INFO: 10.16.23.57:20822 - "GET /health HTTP/1.1" 200 OK
28
- INFO: 10.16.32.101:31431 - "GET /health HTTP/1.1" 200 OK
29
- INFO: 10.16.23.57:2942 - "GET /health HTTP/1.1" 200 OK
30
- INFO: 10.16.24.73:9491 - "GET /health HTTP/1.1" 200 OK
31
- INFO: 10.16.9.217:1774 - "GET /health HTTP/1.1" 200 OK
32
- INFO: 2025-11-19T18:03:30 - app.core.supabase_auth: Session refreshed successfully
33
- INFO: 2025-11-19T18:03:31 - app.api.v1.auth: ✅ Token refreshed successfully for: lewiskimaru01@gmail.com
34
- INFO: 10.16.9.48:14883 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
35
- INFO: 10.16.44.15:11868 - "GET /health HTTP/1.1" 200 OK
36
- INFO: 10.16.24.73:39567 - "GET /health HTTP/1.1" 200 OK
37
- INFO: 2025-11-19T18:04:07 - app.core.supabase_auth: User signed in successfully: lewiskimaru01@gmail.com
38
- INFO: 2025-11-19T18:04:08 - app.services.audit_service: Audit log created: login on auth by lewiskimaru01@gmail.com
39
- INFO: 2025-11-19T18:04:08 - app.api.v1.auth: User logged in successfully: lewiskimaru01@gmail.com
40
- INFO: 10.16.24.73:33037 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
41
- INFO: 10.16.24.73:33037 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
42
- INFO: 10.16.9.217:46480 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
43
- INFO: 10.16.24.73:33037 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
44
- INFO: 10.16.44.15:44735 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
45
- INFO: 10.16.23.57:53623 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
46
- INFO: 10.16.9.48:6208 - "GET /health HTTP/1.1" 200 OK
47
- INFO: 10.16.9.48:47634 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
48
- INFO: 10.16.9.48:47634 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
49
- INFO: 10.16.32.101:36649 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
50
- INFO: 10.16.44.15:25113 - "GET /health HTTP/1.1" 200 OK
51
- INFO: 10.16.9.48:51097 - "GET /health HTTP/1.1" 200 OK
52
- INFO: 10.16.44.15:53488 - "GET /health HTTP/1.1" 200 OK
53
- INFO: 10.16.24.73:45440 - "GET /health HTTP/1.1" 200 OK
54
- INFO: 10.16.9.217:59594 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
55
- INFO: 10.16.9.217:35720 - "GET /health HTTP/1.1" 200 OK
56
- INFO: 10.16.9.217:59594 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
57
- INFO: 10.16.9.48:8842 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
58
- INFO: 10.16.23.57:1209 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
59
- INFO: 10.16.44.15:42543 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
60
- INFO: 10.16.24.73:26343 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
61
- INFO: 10.16.9.48:8842 - "GET /health HTTP/1.1" 200 OK
62
- INFO: 10.16.32.101:57931 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
63
- INFO: 10.16.44.15:1038 - "GET /health HTTP/1.1" 200 OK
64
- INFO: 10.16.24.73:46455 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
65
- INFO: 10.16.44.15:1038 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
66
- INFO: 10.16.24.73:46455 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
67
- INFO: 10.16.9.217:35701 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
68
- INFO: 10.16.44.15:65478 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
69
- INFO: 10.16.44.15:1038 - "GET /health HTTP/1.1" 200 OK
70
- INFO: 10.16.24.73:64129 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
71
- INFO: 10.16.9.217:31856 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
72
- INFO: 10.16.23.57:32898 - "GET /health HTTP/1.1" 200 OK
73
- INFO: 10.16.32.101:23469 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
74
- INFO: 10.16.44.15:42841 - "GET /health HTTP/1.1" 200 OK
75
- INFO: 10.16.24.73:55989 - "GET /health HTTP/1.1" 200 OK
76
- INFO: 10.16.24.73:55989 - "GET /health HTTP/1.1" 200 OK
77
- INFO: 10.16.32.101:37960 - "GET /health HTTP/1.1" 200 OK
78
- INFO: 10.16.32.101:24334 - "GET /health HTTP/1.1" 200 OK
79
- INFO: 10.16.44.15:4143 - "GET /health HTTP/1.1" 200 OK
80
- INFO: 10.16.9.217:17045 - "GET /health HTTP/1.1" 200 OK
81
- INFO: 10.16.32.101:28438 - "GET /health HTTP/1.1" 200 OK
82
- INFO: 10.16.9.217:52544 - "GET /health HTTP/1.1" 200 OK
83
- INFO: 10.16.32.101:16225 - "GET /health HTTP/1.1" 200 OK
84
- INFO: 10.16.24.73:32515 - "GET /health HTTP/1.1" 200 OK
85
- INFO: 10.16.24.73:55957 - "GET /health HTTP/1.1" 200 OK
86
- INFO: 10.16.44.15:7691 - "GET /health HTTP/1.1" 200 OK
87
- INFO: 10.16.44.15:7691 - "GET /health HTTP/1.1" 200 OK
88
- INFO: 10.16.9.48:26192 - "GET /health HTTP/1.1" 200 OK
89
- INFO: 10.16.32.101:50908 - "GET /health HTTP/1.1" 200 OK
90
- INFO: 10.16.9.48:47784 - "GET /health HTTP/1.1" 200 OK
91
- INFO: 10.16.44.15:44349 - "GET /health HTTP/1.1" 200 OK
92
- INFO: 10.16.44.15:64026 - "GET /health HTTP/1.1" 200 OK
93
- INFO: 10.16.9.48:36060 - "GET /health HTTP/1.1" 200 OK
94
- INFO: 10.16.9.48:36060 - "GET /health HTTP/1.1" 200 OK
95
- INFO: 10.16.24.73:44615 - "GET /health HTTP/1.1" 200 OK
96
- INFO: 10.16.44.15:58850 - "GET /health HTTP/1.1" 200 OK
97
- INFO: 10.16.9.48:31981 - "GET /health HTTP/1.1" 200 OK
98
- INFO: 10.16.24.73:48948 - "GET /health HTTP/1.1" 200 OK
99
- INFO: 10.16.32.101:26151 - "GET /health HTTP/1.1" 200 OK
100
- INFO: 10.16.44.15:2391 - "GET /health HTTP/1.1" 200 OK
101
- INFO: 10.16.44.15:2432 - "GET /health HTTP/1.1" 200 OK
102
- INFO: 10.16.32.101:5991 - "GET /health HTTP/1.1" 200 OK
103
- INFO: 10.16.24.73:64863 - "GET /health HTTP/1.1" 200 OK
104
- INFO: 10.16.44.15:40130 - "GET /health HTTP/1.1" 200 OK
105
- INFO: 10.16.32.101:4634 - "GET /health HTTP/1.1" 200 OK
106
- INFO: 10.16.24.73:25665 - "GET /health HTTP/1.1" 200 OK
107
- INFO: 10.16.9.48:6009 - "GET /health HTTP/1.1" 200 OK
108
- INFO: 10.16.32.101:61261 - "GET /health HTTP/1.1" 200 OK
109
- INFO: 10.16.24.73:45215 - "GET /health HTTP/1.1" 200 OK
110
- INFO: 10.16.24.73:40703 - "GET /health HTTP/1.1" 200 OK
111
- INFO: 10.16.44.15:62287 - "GET /health HTTP/1.1" 200 OK
112
- INFO: 10.16.32.101:12563 - "GET /health HTTP/1.1" 200 OK
113
- INFO: 10.16.44.15:29583 - "GET /health HTTP/1.1" 200 OK
114
- INFO: 10.16.32.101:57655 - "GET /health HTTP/1.1" 200 OK
115
- INFO: 2025-11-19T18:20:39 - app.core.supabase_auth: Session refreshed successfully
116
- INFO: 2025-11-19T18:20:40 - app.api.v1.auth: ✅ Token refreshed successfully for: lewiskimaru01@gmail.com
117
- INFO: 10.16.32.101:57655 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
118
- INFO: 10.16.32.101:37346 - "GET /health HTTP/1.1" 200 OK
119
- INFO: 10.16.9.48:17886 - "GET /health HTTP/1.1" 200 OK
120
- INFO: 10.16.9.48:23406 - "GET /health HTTP/1.1" 200 OK
121
- INFO: 10.16.24.73:57916 - "GET /health HTTP/1.1" 200 OK
122
- INFO: 10.16.9.48:24436 - "GET /health HTTP/1.1" 200 OK
123
- INFO: 10.16.32.101:5170 - "GET /health HTTP/1.1" 200 OK
124
- INFO: 10.16.24.73:33672 - "GET /health HTTP/1.1" 200 OK
125
- INFO: 10.16.9.48:59845 - "GET /health HTTP/1.1" 200 OK
126
- INFO: 10.16.44.15:33196 - "GET /health HTTP/1.1" 200 OK
127
- INFO: 10.16.24.73:62767 - "GET /health HTTP/1.1" 200 OK
128
- INFO: 10.16.44.15:9619 - "GET /health HTTP/1.1" 200 OK
129
- INFO: 10.16.32.101:15725 - "GET /health HTTP/1.1" 200 OK
130
- INFO: 10.16.44.15:4072 - "GET /health HTTP/1.1" 200 OK
131
- INFO: 10.16.24.73:19667 - "GET /health HTTP/1.1" 200 OK
132
- INFO: 10.16.9.48:59165 - "GET /health HTTP/1.1" 200 OK
133
- INFO: 10.16.32.101:38560 - "GET /health HTTP/1.1" 200 OK
134
- INFO: 10.16.24.73:5406 - "GET /health HTTP/1.1" 200 OK
135
- INFO: 10.16.24.73:40101 - "GET /health HTTP/1.1" 200 OK
136
- INFO: 10.16.44.15:38292 - "GET /health HTTP/1.1" 200 OK
137
- INFO: 10.16.9.48:5100 - "GET /health HTTP/1.1" 200 OK
138
- INFO: 10.16.24.73:4212 - "GET /health HTTP/1.1" 200 OK
139
- INFO: 10.16.9.48:50251 - "GET /health HTTP/1.1" 200 OK
140
- INFO: 10.16.23.57:44839 - "GET /health HTTP/1.1" 200 OK
141
- INFO: 10.16.24.73:64162 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
142
- INFO: 10.16.32.101:51575 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
143
- INFO: 10.16.9.217:54428 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
144
- INFO: 10.16.24.73:64162 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
145
- INFO: 10.16.9.217:23605 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
146
- INFO: 10.16.9.48:62268 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
147
- INFO: 10.16.9.217:23605 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
148
- INFO: 10.16.9.48:50667 - "GET /health HTTP/1.1" 200 OK
149
- INFO: 10.16.9.48:38071 - "GET /health HTTP/1.1" 200 OK
150
- INFO: 10.16.9.48:11734 - "GET /health HTTP/1.1" 200 OK
151
- INFO: 10.16.9.48:27028 - "GET /health HTTP/1.1" 200 OK
152
- INFO: 10.16.24.73:30084 - "GET /health HTTP/1.1" 200 OK
153
- INFO: 10.16.9.217:46773 - "GET /health HTTP/1.1" 200 OK
154
- INFO: 10.16.23.57:58511 - "GET /health HTTP/1.1" 200 OK
155
- INFO: 10.16.9.217:58254 - "GET /health HTTP/1.1" 200 OK
156
- INFO: 10.16.24.73:51088 - "GET /health HTTP/1.1" 200 OK
157
- INFO: 10.16.24.73:44222 - "GET /health HTTP/1.1" 200 OK
158
- INFO: 10.16.32.101:61153 - "GET /health HTTP/1.1" 200 OK
159
- INFO: 10.16.44.15:61003 - "GET /health HTTP/1.1" 200 OK
160
- INFO: 10.16.23.57:10784 - "GET /health HTTP/1.1" 200 OK
161
- INFO: 10.16.9.217:9962 - "GET /health HTTP/1.1" 200 OK
162
- INFO: 10.16.9.217:26326 - "GET /health HTTP/1.1" 200 OK
163
- INFO: 10.16.44.15:64084 - "GET /health HTTP/1.1" 200 OK
164
- INFO: 10.16.24.73:35755 - "GET /health HTTP/1.1" 200 OK
165
- INFO: 10.16.24.73:35755 - "GET /health HTTP/1.1" 200 OK
166
- INFO: 10.16.24.73:35755 - "GET /health HTTP/1.1" 200 OK
167
- INFO: 10.16.9.217:21422 - "GET /health HTTP/1.1" 200 OK
168
- INFO: 10.16.9.217:30477 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
169
- INFO: 10.16.9.48:55134 - "GET /health HTTP/1.1" 200 OK
170
- INFO: 10.16.24.73:29756 - "GET /health HTTP/1.1" 200 OK
171
- INFO: 10.16.23.57:8799 - "GET /health HTTP/1.1" 200 OK
172
- INFO: 10.16.24.73:49842 - "GET /health HTTP/1.1" 200 OK
173
- INFO: 10.16.24.73:49842 - "GET /health HTTP/1.1" 200 OK
174
- INFO: 10.16.24.73:10593 - "GET /health HTTP/1.1" 200 OK
175
- INFO: 10.16.24.73:50563 - "GET /health HTTP/1.1" 200 OK
176
- INFO: 10.16.9.48:43539 - "GET /health HTTP/1.1" 200 OK
177
- INFO: 10.16.44.15:59538 - "GET /health HTTP/1.1" 200 OK
178
- INFO: 10.16.44.15:59538 - "GET /health HTTP/1.1" 200 OK
179
- INFO: 10.16.44.15:59538 - "GET /health HTTP/1.1" 200 OK
180
- INFO: 10.16.32.101:15888 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
181
- INFO: 10.16.23.57:52668 - "GET /health HTTP/1.1" 200 OK
182
- INFO: 10.16.44.15:59538 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
183
- INFO: 10.16.32.101:15888 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
184
- INFO: 10.16.23.57:53404 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
185
- INFO: 10.16.23.57:1273 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
186
- INFO: 10.16.9.48:22948 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
187
- INFO: 10.16.24.73:53398 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
188
- INFO: 10.16.24.73:53398 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
189
- INFO: 10.16.9.48:22099 - "GET /health HTTP/1.1" 200 OK
190
- INFO: 10.16.24.73:53398 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
191
- INFO: 10.16.9.48:11993 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
192
- INFO: 10.16.44.15:31615 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
193
- INFO: 10.16.23.57:40165 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
194
- INFO: 10.16.9.48:38217 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
195
- INFO: 10.16.9.48:11993 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
196
- INFO: 10.16.44.15:55864 - "GET /health HTTP/1.1" 200 OK
197
- INFO: 10.16.32.101:16760 - "GET /health HTTP/1.1" 200 OK
198
- INFO: 10.16.9.48:49624 - "GET /health HTTP/1.1" 200 OK
199
- INFO: 10.16.44.15:57317 - "GET /health HTTP/1.1" 200 OK
200
- INFO: 10.16.32.101:21205 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
201
- INFO: 10.16.44.15:47703 - "GET /health HTTP/1.1" 200 OK
202
- INFO: 10.16.32.101:21205 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
203
- INFO: 10.16.44.15:29579 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
204
- INFO: 10.16.9.48:49433 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
205
- INFO: 10.16.9.48:55602 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
206
- INFO: 10.16.23.57:5983 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
207
- INFO: 10.16.24.73:8214 - "GET /health HTTP/1.1" 200 OK
208
- INFO: 10.16.32.101:21205 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
209
- INFO: 10.16.24.73:62585 - "GET /health HTTP/1.1" 200 OK
210
- INFO: 10.16.44.15:12739 - "GET /health HTTP/1.1" 200 OK
211
- INFO: 10.16.23.57:55179 - "GET /health HTTP/1.1" 200 OK
212
- INFO: 10.16.32.101:32607 - "GET /health HTTP/1.1" 200 OK
213
- INFO: 10.16.9.48:17254 - "GET /health HTTP/1.1" 200 OK
214
- INFO: 10.16.44.15:59581 - "GET /health HTTP/1.1" 200 OK
215
- INFO: 10.16.44.15:23165 - "GET /health HTTP/1.1" 200 OK
216
- INFO: 10.16.32.101:64140 - "GET /health HTTP/1.1" 200 OK
217
- INFO: 10.16.44.15:10894 - "GET /health HTTP/1.1" 200 OK
218
- INFO: 10.16.24.73:31287 - "GET /health HTTP/1.1" 200 OK
219
- INFO: 10.16.9.48:18366 - "GET /health HTTP/1.1" 200 OK
220
- INFO: 10.16.24.73:9368 - "GET /health HTTP/1.1" 200 OK
221
- INFO: 10.16.9.48:44484 - "GET /health HTTP/1.1" 200 OK
222
- INFO: 10.16.9.48:64335 - "GET /health HTTP/1.1" 200 OK
223
- INFO: 10.16.24.73:8836 - "GET /health HTTP/1.1" 200 OK
224
- INFO: 10.16.32.101:23062 - "GET /health HTTP/1.1" 200 OK
225
- INFO: 10.16.32.101:25734 - "GET /health HTTP/1.1" 200 OK
226
- INFO: 10.16.32.101:7422 - "GET /health HTTP/1.1" 200 OK
227
- INFO: 10.16.44.15:1341 - "GET /health HTTP/1.1" 200 OK
228
- INFO: 10.16.44.15:11907 - "GET /health HTTP/1.1" 200 OK
229
- INFO: 10.16.44.15:11907 - "GET /health HTTP/1.1" 200 OK
230
- INFO: 10.16.24.73:29462 - "GET /health HTTP/1.1" 200 OK
231
- INFO: 10.16.32.101:45809 - "GET /health HTTP/1.1" 200 OK
232
- INFO: 10.16.24.73:4654 - "GET /health HTTP/1.1" 200 OK
233
- INFO: 10.16.32.101:60082 - "GET /health HTTP/1.1" 200 OK
234
- INFO: 10.16.32.101:60082 - "GET /health HTTP/1.1" 200 OK
235
- INFO: 10.16.24.73:59511 - "GET /health HTTP/1.1" 200 OK
236
- INFO: 10.16.24.73:34922 - "GET /health HTTP/1.1" 200 OK
237
- INFO: 10.16.44.15:61932 - "GET /health HTTP/1.1" 200 OK
238
- INFO: 10.16.24.73:44662 - "GET /health HTTP/1.1" 200 OK
239
- INFO: 10.16.24.73:21804 - "GET /health HTTP/1.1" 200 OK
240
- INFO: 10.16.9.48:10225 - "GET /health HTTP/1.1" 200 OK
241
- INFO: 10.16.24.73:37388 - "GET /health HTTP/1.1" 200 OK
242
- INFO: 2025-11-19T18:44:44 - app.core.supabase_auth: Session refreshed successfully
243
- INFO: 2025-11-19T18:44:45 - app.api.v1.auth: ✅ Token refreshed successfully for: lewiskimaru01@gmail.com
244
- INFO: 10.16.44.15:48911 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
245
- INFO: 10.16.44.15:48447 - "GET /health HTTP/1.1" 200 OK
246
- INFO: 10.16.32.101:34997 - "GET /health HTTP/1.1" 200 OK
247
- INFO: 10.16.9.48:42098 - "GET /health HTTP/1.1" 200 OK
248
- INFO: 10.16.44.15:8444 - "GET /health HTTP/1.1" 200 OK
249
- INFO: 10.16.44.15:32658 - "GET /health HTTP/1.1" 200 OK
250
- INFO: 10.16.24.73:40192 - "GET /health HTTP/1.1" 200 OK
251
- INFO: 10.16.9.48:19229 - "GET /health HTTP/1.1" 200 OK
252
- INFO: 10.16.32.101:22557 - "GET /health HTTP/1.1" 200 OK
253
- INFO: 10.16.32.101:12005 - "GET /health HTTP/1.1" 200 OK
254
- INFO: 10.16.24.73:55283 - "GET /health HTTP/1.1" 200 OK
255
- INFO: 10.16.24.73:21174 - "GET /health HTTP/1.1" 200 OK
256
- INFO: 10.16.24.73:14972 - "GET /health HTTP/1.1" 200 OK
257
- INFO: 10.16.9.48:63923 - "GET /health HTTP/1.1" 200 OK
258
- INFO: 10.16.24.73:52978 - "GET /health HTTP/1.1" 200 OK
259
- INFO: 10.16.24.73:45357 - "GET /health HTTP/1.1" 200 OK
260
- INFO: 10.16.44.15:55214 - "GET /health HTTP/1.1" 200 OK
261
- INFO: 10.16.24.73:33489 - "GET /health HTTP/1.1" 200 OK
262
- INFO: 10.16.32.101:35805 - "GET /health HTTP/1.1" 200 OK
263
- INFO: 10.16.44.15:40702 - "GET /health HTTP/1.1" 200 OK
264
- INFO: 10.16.9.48:27151 - "GET / HTTP/1.1" 200 OK
265
- INFO: 10.16.9.48:43920 - "GET /health HTTP/1.1" 200 OK
266
- INFO: 10.16.44.15:9449 - "GET /health HTTP/1.1" 200 OK
267
- INFO: 10.16.24.73:10429 - "GET /health HTTP/1.1" 200 OK
268
- INFO: 10.16.32.101:7525 - "GET /health HTTP/1.1" 200 OK
269
- INFO: 10.16.9.48:53106 - "GET /health HTTP/1.1" 200 OK
270
- INFO: 10.16.32.101:4001 - "GET /health HTTP/1.1" 200 OK
271
- INFO: 10.16.24.73:51779 - "GET /health HTTP/1.1" 200 OK
272
- INFO: 10.16.44.15:16700 - "GET /health HTTP/1.1" 200 OK
273
- INFO: 10.16.24.73:21094 - "GET /health HTTP/1.1" 200 OK
274
- INFO: 10.16.32.101:2291 - "GET /health HTTP/1.1" 200 OK
275
- INFO: 10.16.9.48:9075 - "GET /health HTTP/1.1" 200 OK
276
- INFO: 10.16.44.15:43058 - "GET /health HTTP/1.1" 200 OK
277
- INFO: 10.16.24.73:51421 - "GET /health HTTP/1.1" 200 OK
278
- INFO: 10.16.24.73:48792 - "GET /health HTTP/1.1" 200 OK
279
- INFO: 10.16.9.48:21567 - "GET /health HTTP/1.1" 200 OK
280
- INFO: 10.16.9.48:12059 - "GET /health HTTP/1.1" 200 OK
281
- INFO: 10.16.24.73:53024 - "GET /health HTTP/1.1" 200 OK
282
- INFO: 10.16.23.57:9989 - "GET /health HTTP/1.1" 200 OK
283
- INFO: 10.16.9.48:43575 - "GET /health HTTP/1.1" 200 OK
284
- INFO: 10.16.32.101:32342 - "GET /health HTTP/1.1" 200 OK
285
- INFO: 10.16.9.48:60684 - "GET /health HTTP/1.1" 200 OK
286
- INFO: 10.16.32.101:48328 - "GET /health HTTP/1.1" 200 OK
287
- INFO: 10.16.44.15:17650 - "GET /health HTTP/1.1" 200 OK
288
- INFO: 10.16.9.48:51133 - "GET /health HTTP/1.1" 200 OK
289
- INFO: 10.16.9.48:51133 - "GET /health HTTP/1.1" 200 OK
290
- INFO: 10.16.23.57:37111 - "GET /health HTTP/1.1" 200 OK
291
- INFO: 10.16.44.15:48676 - "GET /health HTTP/1.1" 200 OK
292
- INFO: 10.16.32.101:13860 - "GET /health HTTP/1.1" 200 OK
293
- INFO: 10.16.23.57:46521 - "GET /health HTTP/1.1" 200 OK
294
- INFO: 10.16.24.73:47301 - "GET /health HTTP/1.1" 200 OK
295
- INFO: 10.16.24.73:10196 - "GET /health HTTP/1.1" 200 OK
296
- INFO: 10.16.24.73:2803 - "GET /health HTTP/1.1" 200 OK
297
- INFO: 10.16.9.48:21142 - "GET /health HTTP/1.1" 200 OK
298
- INFO: 10.16.24.73:60509 - "GET /health HTTP/1.1" 200 OK
299
- INFO: 10.16.44.15:51676 - "GET /health HTTP/1.1" 200 OK
300
- INFO: 10.16.23.57:55634 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
301
- INFO: 10.16.44.15:51676 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
302
- INFO: 10.16.23.57:55634 - "GET /health HTTP/1.1" 200 OK
303
- INFO: 10.16.32.101:5578 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
304
- INFO: 10.16.9.48:42928 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
305
- INFO: 10.16.24.73:18115 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
306
- INFO: 10.16.23.57:39258 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
307
- INFO: 10.16.44.15:32804 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
308
- INFO: 10.16.24.73:43113 - "GET /health HTTP/1.1" 200 OK
309
- INFO: 10.16.23.57:30319 - "GET /health HTTP/1.1" 200 OK
310
- INFO: 10.16.23.57:1904 - "GET /health HTTP/1.1" 200 OK
311
- INFO: 10.16.23.57:16796 - "GET /health HTTP/1.1" 200 OK
312
- INFO: 10.16.9.48:1859 - "GET /health HTTP/1.1" 200 OK
313
- INFO: 10.16.44.15:25885 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
314
- INFO: 10.16.23.57:56254 - "GET /health HTTP/1.1" 200 OK
315
- INFO: 10.16.23.57:63134 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
316
- INFO: 10.16.9.48:24556 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
317
- INFO: 10.16.32.101:22093 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
318
- INFO: 10.16.9.48:43386 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
319
- INFO: 10.16.23.57:31760 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
320
- INFO: 10.16.44.15:61791 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
321
- INFO: 10.16.32.101:22093 - "GET /health HTTP/1.1" 200 OK
322
- INFO: 10.16.44.15:59166 - "GET /health HTTP/1.1" 200 OK
323
- INFO: 10.16.24.73:32894 - "GET /health HTTP/1.1" 200 OK
324
- INFO: 10.16.9.48:7990 - "GET /health HTTP/1.1" 200 OK
325
- INFO: 10.16.32.101:14239 - "GET /health HTTP/1.1" 200 OK
326
- INFO: 10.16.44.15:27124 - "GET /health HTTP/1.1" 200 OK
327
- INFO: 10.16.32.101:38236 - "GET /health HTTP/1.1" 200 OK
328
- INFO: 10.16.44.15:40159 - "GET /health HTTP/1.1" 200 OK
329
- INFO: 10.16.9.48:33741 - "GET /health HTTP/1.1" 200 OK
330
- INFO: 10.16.23.57:42613 - "GET /health HTTP/1.1" 200 OK
331
- INFO: 10.16.9.48:60588 - "GET /health HTTP/1.1" 200 OK
332
- INFO: 10.16.24.73:7820 - "GET /health HTTP/1.1" 200 OK
333
- INFO: 10.16.9.48:35144 - "GET /health HTTP/1.1" 200 OK
334
- INFO: 10.16.32.101:21656 - "GET /health HTTP/1.1" 200 OK
335
- INFO: 10.16.44.15:2747 - "GET /health HTTP/1.1" 200 OK
336
- INFO: 10.16.44.15:46019 - "GET /health HTTP/1.1" 200 OK
337
- INFO: 10.16.24.73:53928 - "GET /health HTTP/1.1" 200 OK
338
- INFO: 10.16.9.48:65308 - "GET /health HTTP/1.1" 200 OK
339
- INFO: 10.16.9.48:65308 - "GET /health HTTP/1.1" 200 OK
340
- INFO: 10.16.9.48:47785 - "GET /health HTTP/1.1" 200 OK
341
- INFO: 10.16.32.101:31440 - "GET /health HTTP/1.1" 200 OK
342
- INFO: 10.16.24.73:8262 - "GET /health HTTP/1.1" 200 OK
343
- INFO: 10.16.9.48:34309 - "GET /health HTTP/1.1" 200 OK
344
- INFO: 10.16.32.101:9686 - "GET /health HTTP/1.1" 200 OK
345
- INFO: 10.16.9.48:62174 - "GET /health HTTP/1.1" 200 OK
346
- INFO: 10.16.9.48:62174 - "GET /health HTTP/1.1" 200 OK
347
- INFO: 10.16.32.101:27029 - "GET /health HTTP/1.1" 200 OK
348
- INFO: 10.16.24.73:4572 - "GET /health HTTP/1.1" 200 OK
349
- INFO: 10.16.9.48:42064 - "GET /health HTTP/1.1" 200 OK
350
- INFO: 10.16.32.101:16058 - "GET /health HTTP/1.1" 200 OK
351
- INFO: 10.16.44.15:3710 - "GET /health HTTP/1.1" 200 OK
352
- INFO: 10.16.44.15:3710 - "GET /health HTTP/1.1" 200 OK
353
- INFO: 10.16.44.15:3710 - "GET /health HTTP/1.1" 200 OK
354
- INFO: 10.16.9.48:55348 - "GET /health HTTP/1.1" 200 OK
355
- INFO: 10.16.9.48:7931 - "GET /health HTTP/1.1" 200 OK
356
- INFO: 10.16.44.15:3547 - "GET /health HTTP/1.1" 200 OK
357
- INFO: 10.16.32.101:57391 - "GET /health HTTP/1.1" 200 OK
358
- INFO: 10.16.32.101:57391 - "GET /health HTTP/1.1" 200 OK
359
- INFO: 10.16.32.101:47915 - "GET /health HTTP/1.1" 200 OK
360
- INFO: 10.16.9.48:39475 - "GET /health HTTP/1.1" 200 OK
361
- INFO: 10.16.44.15:9295 - "GET /health HTTP/1.1" 200 OK
362
- INFO: 10.16.9.48:13964 - "GET /health HTTP/1.1" 200 OK
363
- INFO: 10.16.24.73:12467 - "GET /health HTTP/1.1" 200 OK
364
- INFO: 10.16.44.15:30288 - "GET /health HTTP/1.1" 200 OK
365
- INFO: 10.16.32.101:46326 - "GET /health HTTP/1.1" 200 OK
366
- INFO: 10.16.44.15:40584 - "GET /health HTTP/1.1" 200 OK
367
- INFO: 10.16.24.73:15544 - "GET /health HTTP/1.1" 200 OK
368
- INFO: 10.16.44.15:1747 - "GET /health HTTP/1.1" 200 OK
369
- INFO: 10.16.32.101:5512 - "GET /health HTTP/1.1" 200 OK
370
- INFO: 10.16.32.101:56867 - "GET /health HTTP/1.1" 200 OK
371
- INFO: 10.16.32.101:22788 - "GET /health HTTP/1.1" 200 OK
372
- INFO: 10.16.24.73:49905 - "GET /health HTTP/1.1" 200 OK
373
- INFO: 10.16.32.101:46907 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
374
- INFO: 10.16.44.15:31435 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
375
- INFO: 10.16.24.73:49905 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
376
- INFO: 10.16.9.48:29443 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
377
- INFO: 10.16.44.15:38515 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
378
- INFO: 10.16.9.48:40679 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
379
- INFO: 10.16.44.15:31435 - "GET /health HTTP/1.1" 200 OK
380
- INFO: 10.16.9.48:40679 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
381
- INFO: 10.16.24.73:41310 - "GET /health HTTP/1.1" 200 OK
382
- INFO: 2025-11-19T19:05:53 - app.core.supabase_auth: User signed in successfully: lewiskimaru01@gmail.com
383
- INFO: 2025-11-19T19:05:55 - app.services.audit_service: Audit log created: login on auth by lewiskimaru01@gmail.com
384
- INFO: 2025-11-19T19:05:55 - app.api.v1.auth: User logged in successfully: lewiskimaru01@gmail.com
385
- INFO: 10.16.9.48:22334 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
386
- INFO: 10.16.24.73:15132 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
387
- INFO: 10.16.9.48:22334 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
388
- INFO: 10.16.32.101:45673 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
389
- INFO: 10.16.44.15:61982 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
390
- INFO: 10.16.32.101:12364 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
391
- INFO: 10.16.9.48:22359 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
392
- INFO: 10.16.44.15:28741 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
393
- INFO: 10.16.9.48:50471 - "GET /health HTTP/1.1" 200 OK
394
- INFO: 10.16.24.73:38180 - "GET /health HTTP/1.1" 200 OK
395
- INFO: 10.16.24.73:49594 - "GET /health HTTP/1.1" 200 OK
396
- INFO: 10.16.32.101:8591 - "GET /health HTTP/1.1" 200 OK
397
- INFO: 10.16.44.15:6365 - "GET /health HTTP/1.1" 200 OK
398
- INFO: 10.16.44.15:24211 - "GET /health HTTP/1.1" 200 OK
399
- INFO: 10.16.32.101:52764 - "GET /health HTTP/1.1" 200 OK
400
- INFO: 10.16.44.15:65119 - "GET /health HTTP/1.1" 200 OK
401
- INFO: 10.16.44.15:29891 - "GET /health HTTP/1.1" 200 OK
402
- INFO: 10.16.9.48:40543 - "GET /health HTTP/1.1" 200 OK
403
- INFO: 10.16.30.124:20874 - "GET /health HTTP/1.1" 200 OK
404
- INFO: 10.16.44.15:23507 - "GET /health HTTP/1.1" 200 OK
405
- INFO: 10.16.32.101:59136 - "GET /health HTTP/1.1" 200 OK
406
- INFO: 10.16.44.15:51353 - "GET /health HTTP/1.1" 200 OK
407
- INFO: 10.16.32.101:43911 - "GET /health HTTP/1.1" 200 OK
408
- INFO: 10.16.32.101:43911 - "GET /health HTTP/1.1" 200 OK
409
- INFO: 10.16.32.101:29285 - "GET /health HTTP/1.1" 200 OK
410
- INFO: 10.16.44.15:15096 - "GET /health HTTP/1.1" 200 OK
411
- INFO: 10.16.24.73:7979 - "GET /health HTTP/1.1" 200 OK
412
- INFO: 2025-11-19T19:09:12 - app.services.audit_service: Audit log created: create on client by lewiskimaru01@gmail.com
413
- INFO: 2025-11-19T19:09:12 - app.api.v1.clients: New client created: Operator Tel by lewiskimaru01@gmail.com (platform_admin)
414
- INFO: 10.16.24.73:7979 - "POST /api/v1/clients HTTP/1.1" 201 Created
415
- INFO: 10.16.32.101:57023 - "GET /health HTTP/1.1" 200 OK
416
- INFO: 2025-11-19T19:09:16 - app.services.notification_service: Email invitation sent to 64ltd@2200freefonts.com
417
- INFO: 2025-11-19T19:09:17 - app.services.invitation_service: Invitation created for 64ltd@2200freefonts.com by lewiskimaru01@gmail.com
418
- INFO: 10.16.44.15:31492 - "POST /api/v1/invitations HTTP/1.1" 201 Created
419
- INFO: 10.16.24.73:17060 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
420
- INFO: 10.16.32.101:43300 - "GET /health HTTP/1.1" 200 OK
421
- INFO: 10.16.32.101:62528 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
422
- INFO: 10.16.32.101:8312 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
423
- INFO: 10.16.44.15:12603 - "GET /health HTTP/1.1" 200 OK
424
- INFO: 10.16.32.101:43032 - "GET /health HTTP/1.1" 200 OK
425
- INFO: 10.16.44.15:49131 - "GET /health HTTP/1.1" 200 OK
426
- INFO: 10.16.32.101:59318 - "GET /health HTTP/1.1" 200 OK
427
- INFO: 10.16.32.101:38844 - "GET /health HTTP/1.1" 200 OK
428
- INFO: 10.16.24.73:15899 - "GET /health HTTP/1.1" 200 OK
429
- INFO: 10.16.30.124:53377 - "GET /health HTTP/1.1" 200 OK
430
- INFO: 10.16.24.73:57461 - "GET /health HTTP/1.1" 200 OK
431
- INFO: 10.16.44.15:17196 - "GET /health HTTP/1.1" 200 OK
432
- INFO: 10.16.30.124:59762 - "GET /health HTTP/1.1" 200 OK
433
- INFO: 10.16.30.124:59762 - "GET /health HTTP/1.1" 200 OK
434
- INFO: 10.16.30.124:59762 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
435
- INFO: 10.16.24.73:31964 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
436
- INFO: 10.16.32.101:50020 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
437
- INFO: 10.16.30.124:59762 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
438
- INFO: 10.16.44.15:38397 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
439
- INFO: 10.16.24.73:31964 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
440
- INFO: 10.16.30.124:59762 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
441
- INFO: 10.16.44.15:38397 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
442
- INFO: 10.16.44.15:47920 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
443
- INFO: 10.16.30.124:59762 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
444
- INFO: 10.16.32.101:5308 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
445
- INFO: 10.16.44.15:47920 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
446
- INFO: 10.16.30.124:59762 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
447
- INFO: 10.16.30.124:4274 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
448
- INFO: 10.16.24.73:44371 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
449
- INFO: 10.16.24.73:5371 - "GET /health HTTP/1.1" 200 OK
450
- INFO: 10.16.30.124:1438 - "GET /health HTTP/1.1" 200 OK
451
- INFO: 10.16.44.15:29556 - "GET /health HTTP/1.1" 200 OK
452
- INFO: 10.16.30.124:53935 - "GET /health HTTP/1.1" 200 OK
453
- INFO: 10.16.32.101:26174 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
454
- INFO: 10.16.24.73:22094 - "POST /api/v1/invitations/validate HTTP/1.1" 200 OK
455
- INFO: 10.16.32.101:26174 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
456
- INFO: 10.16.30.124:53935 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
457
- INFO: 10.16.24.73:22094 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
458
- INFO: 10.16.44.15:40043 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
459
- INFO: 10.16.30.124:64548 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
460
- INFO: 10.16.32.101:26174 - "GET /health HTTP/1.1" 200 OK
461
- INFO: 10.16.44.15:42291 - "GET /health HTTP/1.1" 200 OK
462
- INFO: 10.16.44.15:42291 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
463
- INFO: 10.16.32.101:53426 - "GET /health HTTP/1.1" 200 OK
464
- INFO: 10.16.24.73:5786 - "GET /health HTTP/1.1" 200 OK
465
- INFO: 10.16.44.15:35039 - "GET /health HTTP/1.1" 200 OK
466
- INFO: 10.16.32.101:58076 - "GET /health HTTP/1.1" 200 OK
467
- INFO: 10.16.44.15:41913 - "GET /health HTTP/1.1" 200 OK
468
- INFO: 10.16.30.124:52147 - "GET /health HTTP/1.1" 200 OK
469
- INFO: 10.16.9.217:25517 - "GET /health HTTP/1.1" 200 OK
470
- INFO: 10.16.30.124:30829 - "GET /health HTTP/1.1" 200 OK
471
- INFO: 10.16.30.124:30829 - "GET /health HTTP/1.1" 200 OK
472
- INFO: 10.16.24.73:17212 - "GET /health HTTP/1.1" 200 OK
473
- INFO: 10.16.44.15:55587 - "GET /health HTTP/1.1" 200 OK
474
- INFO: 10.16.32.101:54533 - "GET /health HTTP/1.1" 200 OK
475
- INFO: 10.16.32.101:53761 - "GET /health HTTP/1.1" 200 OK
476
- INFO: 10.16.44.15:53554 - "GET /health HTTP/1.1" 200 OK
477
- INFO: 10.16.24.73:38153 - "GET /health HTTP/1.1" 200 OK
478
- INFO: 10.16.30.124:63527 - "GET /health HTTP/1.1" 200 OK
479
- INFO: 10.16.44.15:56104 - "GET /health HTTP/1.1" 200 OK
480
- INFO: 10.16.24.73:43604 - "GET /health HTTP/1.1" 200 OK
481
- INFO: 10.16.44.15:3920 - "GET /health HTTP/1.1" 200 OK
482
- INFO: 10.16.30.124:38841 - "GET /health HTTP/1.1" 200 OK
483
- INFO: 10.16.44.15:14742 - "GET /health HTTP/1.1" 200 OK
484
- INFO: 10.16.30.124:28078 - "GET /health HTTP/1.1" 200 OK
485
- INFO: 10.16.9.217:49591 - "GET /health HTTP/1.1" 200 OK
486
- INFO: 2025-11-19T19:15:26 - app.services.audit_service: Audit log created: create on contractor by lewiskimaru01@gmail.com
487
- INFO: 2025-11-19T19:15:26 - app.api.v1.contractors: New contractor created: Contractor Tel by lewiskimaru01@gmail.com (platform_admin)
488
- INFO: 10.16.44.15:63169 - "POST /api/v1/contractors HTTP/1.1" 201 Created
489
- INFO: 10.16.24.73:50481 - "GET /health HTTP/1.1" 200 OK
490
- INFO: 10.16.9.217:16863 - "GET /health HTTP/1.1" 200 OK
491
- INFO: 10.16.32.101:56698 - "GET /health HTTP/1.1" 200 OK
492
- INFO: 2025-11-19T19:15:32 - app.services.notification_service: Email invitation sent to leonardob54@falleweng.com
493
- INFO: 2025-11-19T19:15:33 - app.services.invitation_service: Invitation created for leonardob54@falleweng.com by lewiskimaru01@gmail.com
494
- INFO: 10.16.44.15:63169 - "POST /api/v1/invitations HTTP/1.1" 201 Created
495
- INFO: 10.16.30.124:31449 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
496
- INFO: 10.16.30.124:3124 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
497
- INFO: 10.16.30.124:14585 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
498
- INFO: 10.16.32.101:56698 - "GET /health HTTP/1.1" 200 OK
499
- INFO: 10.16.9.217:13362 - "GET /health HTTP/1.1" 200 OK
500
- INFO: 2025-11-19T19:15:41 - app.core.supabase_auth: Session refreshed successfully
501
- INFO: 2025-11-19T19:15:42 - app.api.v1.auth: ✅ Token refreshed successfully for: lewiskimaru01@gmail.com
502
- INFO: 10.16.24.73:9172 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
503
- INFO: 10.16.9.217:32591 - "GET /health HTTP/1.1" 200 OK
504
- INFO: 2025-11-19T19:15:58 - app.services.audit_service: Audit log created: logout on auth by system
505
- INFO: 2025-11-19T19:15:58 - app.api.v1.auth: User logged out: lewiskimaru01@gmail.com
506
- INFO: 10.16.9.217:23061 - "POST /api/v1/auth/logout HTTP/1.1" 200 OK
507
- INFO: 2025-11-19T19:15:59 - app.services.audit_service: Audit log created: logout on auth by system
508
- INFO: 2025-11-19T19:16:00 - app.api.v1.auth: User logged out: lewiskimaru01@gmail.com
509
- INFO: 10.16.9.217:23061 - "POST /api/v1/auth/logout HTTP/1.1" 200 OK
510
- INFO: 10.16.9.217:23061 - "GET /health HTTP/1.1" 200 OK
511
- INFO: 10.16.9.217:23061 - "GET /health HTTP/1.1" 200 OK
512
- INFO: 10.16.9.217:36302 - "GET /health HTTP/1.1" 200 OK
513
- INFO: 10.16.32.101:5216 - "POST /api/v1/invitations/validate HTTP/1.1" 200 OK
514
- INFO: 10.16.32.101:45763 - "GET /health HTTP/1.1" 200 OK
515
- INFO: 10.16.9.217:20366 - "GET /health HTTP/1.1" 200 OK
516
- INFO: 10.16.30.124:1685 - "GET /health HTTP/1.1" 200 OK
517
- INFO: 10.16.9.217:33000 - "GET /health HTTP/1.1" 200 OK
518
- INFO: 10.16.9.217:33000 - "GET /health HTTP/1.1" 200 OK
519
- INFO: 10.16.32.101:1024 - "GET /health HTTP/1.1" 200 OK
520
- INFO: 10.16.32.101:60320 - "GET /health HTTP/1.1" 200 OK
521
- INFO: 10.16.44.15:44321 - "GET /health HTTP/1.1" 200 OK
522
- INFO: 2025-11-19T19:17:17 - app.core.supabase_auth: User registered successfully: 64ltd@2200freefonts.com
523
- INFO: 2025-11-19T19:17:19 - app.services.invitation_service: User created from invitation: 64ltd@2200freefonts.com
524
- INFO: 10.16.44.15:44321 - "POST /api/v1/invitations/accept HTTP/1.1" 200 OK
525
- INFO: 10.16.44.15:44321 - "GET /health HTTP/1.1" 200 OK
526
- INFO: 10.16.32.101:34859 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
527
- INFO: 10.16.9.217:57268 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
528
- INFO: 10.16.44.15:44321 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
529
- INFO: 10.16.32.101:48443 - "GET /health HTTP/1.1" 200 OK
530
- INFO: 10.16.30.124:29330 - "GET /health HTTP/1.1" 200 OK
531
- INFO: 10.16.24.73:56284 - "GET /health HTTP/1.1" 200 OK
532
- INFO: 10.16.32.101:58445 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
533
- INFO: 10.16.44.15:4858 - "GET /health HTTP/1.1" 200 OK
534
- INFO: 10.16.30.124:21913 - "GET /api/v1/projects?skip=0&limit=50 HTTP/1.1" 200 OK
535
- INFO: 10.16.24.73:27615 - "GET /health HTTP/1.1" 200 OK
536
- INFO: 10.16.32.101:42216 - "GET /health HTTP/1.1" 200 OK
537
- INFO: 10.16.30.124:46229 - "GET /health HTTP/1.1" 200 OK
538
- INFO: 10.16.30.124:46229 - "GET /health HTTP/1.1" 200 OK
539
- INFO: 10.16.32.101:59965 - "GET /health HTTP/1.1" 200 OK
540
- INFO: 10.16.32.101:59965 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
541
- INFO: 10.16.30.124:25019 - "GET /health HTTP/1.1" 200 OK
542
- INFO: 10.16.44.15:25177 - "GET /health HTTP/1.1" 200 OK
543
- INFO: 10.16.30.124:25019 - "GET /health HTTP/1.1" 200 OK
544
- INFO: 10.16.44.15:6561 - "GET /health HTTP/1.1" 200 OK
545
- INFO: 2025-11-19T19:18:37 - app.services.audit_service: Audit log created: logout on auth by system
546
- INFO: 2025-11-19T19:18:38 - app.api.v1.auth: User logged out: 64ltd@2200freefonts.com
547
- INFO: 10.16.44.15:1731 - "POST /api/v1/auth/logout HTTP/1.1" 200 OK
548
- INFO: 10.16.32.101:61330 - "GET /health HTTP/1.1" 200 OK
549
- INFO: 10.16.30.124:16222 - "POST /api/v1/invitations/validate HTTP/1.1" 200 OK
550
- INFO: 10.16.32.101:52886 - "GET /health HTTP/1.1" 200 OK
551
- INFO: 10.16.30.124:42512 - "GET /health HTTP/1.1" 200 OK
552
- INFO: 10.16.24.73:26797 - "GET /health HTTP/1.1" 200 OK
553
- INFO: 10.16.30.124:11582 - "GET /health HTTP/1.1" 200 OK
554
- INFO: 10.16.32.101:21218 - "GET /health HTTP/1.1" 200 OK
555
- INFO: 10.16.32.101:49919 - "GET /health HTTP/1.1" 200 OK
556
- INFO: 10.16.30.124:13422 - "GET /health HTTP/1.1" 200 OK
557
- INFO: 10.16.32.101:49919 - "GET /health HTTP/1.1" 200 OK
558
- INFO: 10.16.30.124:13422 - "GET /health HTTP/1.1" 200 OK
559
- INFO: 10.16.30.124:40050 - "GET /health HTTP/1.1" 200 OK
560
- INFO: 2025-11-19T19:19:59 - app.core.supabase_auth: User registered successfully: leonardob54@falleweng.com
561
- INFO: 2025-11-19T19:20:00 - app.services.invitation_service: User created from invitation: leonardob54@falleweng.com
562
- INFO: 10.16.30.124:14243 - "POST /api/v1/invitations/accept HTTP/1.1" 200 OK
563
- INFO: 10.16.44.15:58383 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
564
- INFO: 10.16.44.15:14921 - "GET /health HTTP/1.1" 200 OK
565
- INFO: 10.16.32.101:27428 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
566
- INFO: 10.16.24.73:45119 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
567
- INFO: 10.16.32.101:58640 - "GET /health HTTP/1.1" 200 OK
568
- INFO: 10.16.30.124:35848 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
569
- INFO: 10.16.44.15:50162 - "GET /health HTTP/1.1" 200 OK
570
- INFO: 10.16.44.15:45472 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
571
- INFO: 10.16.44.15:45472 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
572
- INFO: 10.16.30.124:39911 - "GET /health HTTP/1.1" 200 OK
573
- INFO: 10.16.44.15:50162 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
574
- INFO: 10.16.30.124:39911 - "GET /health HTTP/1.1" 200 OK
575
- INFO: 10.16.32.101:50239 - "GET /health HTTP/1.1" 200 OK
576
- INFO: 10.16.44.15:63358 - "GET /health HTTP/1.1" 200 OK
577
- INFO: 10.16.32.101:29840 - "GET /health HTTP/1.1" 200 OK
578
- INFO: 10.16.30.124:31049 - "GET /health HTTP/1.1" 200 OK
579
- INFO: 10.16.24.73:15281 - "GET /health HTTP/1.1" 200 OK
580
- INFO: 10.16.32.101:50039 - "GET /health HTTP/1.1" 200 OK
581
- INFO: 10.16.44.15:56955 - "GET /health HTTP/1.1" 200 OK
582
- INFO: 2025-11-19T19:21:22 - app.services.audit_service: Audit log created: logout on auth by system
583
- INFO: 2025-11-19T19:21:23 - app.api.v1.auth: User logged out: leonardob54@falleweng.com
584
- INFO: 10.16.44.15:56955 - "POST /api/v1/auth/logout HTTP/1.1" 200 OK
585
- INFO: 10.16.32.101:17543 - "GET /health HTTP/1.1" 200 OK
586
- INFO: 10.16.24.73:21779 - "GET /health HTTP/1.1" 200 OK
587
- INFO: 10.16.24.73:21779 - "GET /health HTTP/1.1" 200 OK
588
- INFO: 10.16.32.101:9364 - "GET /health HTTP/1.1" 200 OK
589
- INFO: 10.16.24.73:21779 - "GET /health HTTP/1.1" 200 OK
590
- INFO: 10.16.30.124:43475 - "GET /health HTTP/1.1" 200 OK
591
- INFO: 10.16.30.124:5216 - "GET /health HTTP/1.1" 200 OK
592
- INFO: 10.16.44.15:9430 - "GET /health HTTP/1.1" 200 OK
593
- INFO: 10.16.30.124:39223 - "GET /health HTTP/1.1" 200 OK
594
- INFO: 10.16.24.73:34199 - "GET /health HTTP/1.1" 200 OK
595
- INFO: 10.16.44.15:24528 - "GET /health HTTP/1.1" 200 OK
596
- INFO: 10.16.44.15:17303 - "GET /health HTTP/1.1" 200 OK
597
- INFO: 10.16.32.101:4384 - "GET /health HTTP/1.1" 200 OK
598
- INFO: 10.16.32.101:6299 - "GET /health HTTP/1.1" 200 OK
599
- INFO: 10.16.44.15:34779 - "GET /health HTTP/1.1" 200 OK
600
- INFO: 10.16.32.101:64166 - "GET /health HTTP/1.1" 200 OK
601
- INFO: 2025-11-19T19:23:04 - app.services.otp_service: Stored registration data for 7183coral@somoj.com
602
- INFO: 2025-11-19T19:23:04 - app.services.notification_service: Email sent to lewiskimaru01@gmail.com: SwiftOps Platform Admin Registration Request
603
- INFO: 2025-11-19T19:23:04 - app.services.otp_service: OTP sent via email for Platform Admin Registration (storage: redis)
604
- INFO: 2025-11-19T19:23:05 - app.services.audit_service: Audit log created: login_failed on auth by system
605
- INFO: 2025-11-19T19:23:05 - app.api.v1.auth: Platform admin registration OTP sent for: 7183coral@somoj.com
606
- INFO: 10.16.32.101:28070 - "POST /api/v1/auth/send-admin-otp HTTP/1.1" 200 OK
607
- INFO: 10.16.24.73:17812 - "GET /health HTTP/1.1" 200 OK
608
- INFO: 2025-11-19T19:23:17 - app.core.supabase_auth: Session refreshed successfully
609
- INFO: 2025-11-19T19:23:17 - app.api.v1.auth: ✅ Token refreshed successfully for: lewiskimaru01@gmail.com
610
- INFO: 10.16.44.15:42933 - "POST /api/v1/auth/refresh-token HTTP/1.1" 200 OK
611
- INFO: 10.16.24.73:17812 - "GET /health HTTP/1.1" 200 OK
612
- INFO: 10.16.32.101:31518 - "GET /health HTTP/1.1" 200 OK
613
- INFO: 10.16.32.101:59268 - "GET /health HTTP/1.1" 200 OK
614
- INFO: 10.16.30.124:50292 - "GET /health HTTP/1.1" 200 OK
615
- INFO: 10.16.44.15:1622 - "GET /health HTTP/1.1" 200 OK
616
- INFO: 10.16.24.73:34115 - "GET /health HTTP/1.1" 200 OK
617
- INFO: 10.16.30.124:50292 - "GET /health HTTP/1.1" 200 OK
618
- INFO: 10.16.24.73:34115 - "GET /health HTTP/1.1" 200 OK
619
- INFO: 2025-11-19T19:23:50 - app.services.otp_service: OTP verified successfully for Platform Admin Registration (storage: redis)
620
- INFO: 2025-11-19T19:23:52 - app.core.supabase_auth: User registered successfully: 7183coral@somoj.com
621
- INFO: 2025-11-19T19:23:54 - app.services.audit_service: Audit log created: create on user by 7183coral@somoj.com
622
- INFO: 2025-11-19T19:23:54 - app.api.v1.auth: ✅ Platform admin account created successfully: 7183coral@somoj.com
623
- INFO: 10.16.44.15:14036 - "POST /api/v1/auth/register HTTP/1.1" 201 Created
624
- INFO: 10.16.44.15:14036 - "GET /health HTTP/1.1" 200 OK
625
- INFO: 10.16.32.101:44829 - "GET /health HTTP/1.1" 200 OK
626
- INFO: 10.16.32.101:44829 - "GET /health HTTP/1.1" 200 OK
627
- INFO: 10.16.32.101:53897 - "GET /health HTTP/1.1" 200 OK
628
- INFO: 10.16.44.15:12091 - "GET /health HTTP/1.1" 200 OK
629
- INFO: 10.16.24.73:59361 - "GET /health HTTP/1.1" 200 OK
630
- INFO: 10.16.32.101:62900 - "GET /health HTTP/1.1" 200 OK
631
- INFO: 10.16.44.15:18093 - "GET /health HTTP/1.1" 200 OK
632
- INFO: 2025-11-19T19:24:30 - app.core.supabase_auth: User signed in successfully: 7183coral@somoj.com
633
- INFO: 2025-11-19T19:24:32 - app.services.audit_service: Audit log created: login on auth by 7183coral@somoj.com
634
- INFO: 2025-11-19T19:24:32 - app.api.v1.auth: User logged in successfully: 7183coral@somoj.com
635
- INFO: 10.16.30.124:6267 - "POST /api/v1/auth/login HTTP/1.1" 200 OK
636
- INFO: 10.16.30.124:6267 - "GET /api/v1/auth/me HTTP/1.1" 200 OK
637
- INFO: 10.16.44.15:25554 - "GET /api/v1/auth/me/preferences HTTP/1.1" 200 OK
638
- INFO: 10.16.44.15:8944 - "GET /health HTTP/1.1" 200 OK
639
- INFO: 10.16.32.101:57808 - "GET /api/v1/auth/me/preferences/available-apps HTTP/1.1" 200 OK
640
- INFO: 10.16.32.101:14477 - "GET /api/v1/clients?skip=0&limit=20 HTTP/1.1" 200 OK
641
- INFO: 10.16.32.101:64745 - "GET /health HTTP/1.1" 200 OK
642
- INFO: 10.16.32.101:7113 - "GET /api/v1/users?skip=0&limit=20 HTTP/1.1" 200 OK
643
- INFO: 10.16.44.15:8944 - "GET /health HTTP/1.1" 200 OK
644
- INFO: 10.16.32.101:23498 - "GET /api/v1/contractors?skip=0&limit=20 HTTP/1.1" 200 OK
645
- INFO: 10.16.23.57:55077 - "GET /health HTTP/1.1" 200 OK
646
- INFO: 10.16.24.73:38890 - "GET /health HTTP/1.1" 200 OK
647
- INFO: 10.16.32.101:23498 - "GET /api/v1/audit-logs?skip=0&limit=20 HTTP/1.1" 200 OK
648
- INFO: 10.16.30.124:55582 - "GET /health HTTP/1.1" 200 OK
649
- INFO: 10.16.44.15:50359 - "PUT /api/v1/auth/me/preferences HTTP/1.1" 200 OK
650
- INFO: 10.16.44.15:48645 - "GET /health HTTP/1.1" 200 OK
651
- INFO: 10.16.44.15:63611 - "GET /health HTTP/1.1" 200 OK
652
- INFO: 10.16.44.15:3665 - "GET /health HTTP/1.1" 200 OK
653
- INFO: 10.16.24.73:14835 - "GET /health HTTP/1.1" 200 OK
654
- INFO: 10.16.32.101:9690 - "GET /health HTTP/1.1" 200 OK
655
- INFO: 10.16.32.101:31832 - "GET /health HTTP/1.1" 200 OK
656
- INFO: 10.16.30.124:34269 - "GET /health HTTP/1.1" 200 OK
657
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/api/v1/auth.py CHANGED
@@ -844,178 +844,6 @@ async def update_profile(
844
  return current_user
845
 
846
 
847
- @router.put("/me/preferences", response_model=UserProfile)
848
- async def update_user_preferences(
849
- preferences: dict,
850
- request: Request,
851
- current_user: User = Depends(get_current_active_user),
852
- db: Session = Depends(get_db)
853
- ):
854
- """
855
- Update user preferences (e.g., last active project)
856
-
857
- Body format:
858
- {
859
- "last_active_project_id": "550e8400-e29b-41d4-a716-446655440000"
860
- }
861
-
862
- This allows the frontend to persist the user's active project selection
863
- so they land on the correct dashboard next time they login.
864
-
865
- Note: Platform admins cannot set last_active_project_id (they don't belong to projects)
866
-
867
- Requires authentication token
868
- """
869
- from app.models.project import Project
870
- from app.models.project_team import ProjectTeam
871
- from app.models.user_preference import UserPreference
872
- from uuid import UUID as PyUUID
873
-
874
- # Platform admins don't have project context
875
- if current_user.role == 'platform_admin' and "last_active_project_id" in preferences:
876
- raise HTTPException(
877
- status_code=status.HTTP_400_BAD_REQUEST,
878
- detail="Platform admins cannot set active project (no project assignments)"
879
- )
880
-
881
- # Get or create user preferences
882
- user_prefs = db.query(UserPreference).filter(
883
- UserPreference.user_id == current_user.id,
884
- UserPreference.deleted_at.is_(None)
885
- ).first()
886
-
887
- if not user_prefs:
888
- # Create default preferences if they don't exist
889
- user_prefs = UserPreference(user_id=current_user.id)
890
- db.add(user_prefs)
891
- db.flush()
892
-
893
- changes = {}
894
-
895
- # Handle last_active_project_id update
896
- if "last_active_project_id" in preferences:
897
- new_project_id_str = preferences["last_active_project_id"]
898
-
899
- if new_project_id_str is None:
900
- # Allow clearing the preference
901
- changes['old_project_id'] = str(user_prefs.last_active_project_id) if user_prefs.last_active_project_id else None
902
- user_prefs.last_active_project_id = None
903
- changes['new_project_id'] = None
904
- else:
905
- try:
906
- # Convert string to UUID
907
- new_project_id = PyUUID(new_project_id_str)
908
-
909
- # Verify user is actually assigned to this project
910
- is_member = db.query(ProjectTeam).filter(
911
- ProjectTeam.user_id == current_user.id,
912
- ProjectTeam.project_id == new_project_id,
913
- ProjectTeam.deleted_at.is_(None),
914
- ProjectTeam.removed_at.is_(None)
915
- ).first()
916
-
917
- if not is_member:
918
- raise HTTPException(
919
- status_code=status.HTTP_403_FORBIDDEN,
920
- detail="You are not assigned to this project"
921
- )
922
-
923
- # Verify project exists and is active
924
- project = db.query(Project).filter(
925
- Project.id == new_project_id,
926
- Project.deleted_at.is_(None)
927
- ).first()
928
-
929
- if not project:
930
- raise HTTPException(
931
- status_code=status.HTTP_404_NOT_FOUND,
932
- detail="Project not found"
933
- )
934
-
935
- changes['old_project_id'] = str(user_prefs.last_active_project_id) if user_prefs.last_active_project_id else None
936
- user_prefs.last_active_project_id = new_project_id
937
- changes['new_project_id'] = str(new_project_id)
938
-
939
- except ValueError:
940
- raise HTTPException(
941
- status_code=status.HTTP_400_BAD_REQUEST,
942
- detail="Invalid project ID format"
943
- )
944
-
945
- db.commit()
946
- db.refresh(user_prefs)
947
-
948
- # Audit preference update
949
- if changes:
950
- AuditService.log_action(
951
- db=db,
952
- action='update',
953
- entity_type='user_preferences',
954
- entity_id=str(current_user.id),
955
- description=f"User updated preferences: {current_user.email}",
956
- user=current_user,
957
- request=request,
958
- changes=changes
959
- )
960
-
961
- # Return full profile with updated project context (reuse the logic from GET /me)
962
- from app.schemas.user import ProjectContext
963
-
964
- # Get all projects user is assigned to
965
- project_memberships = db.query(ProjectTeam).filter(
966
- ProjectTeam.user_id == current_user.id,
967
- ProjectTeam.deleted_at.is_(None),
968
- ProjectTeam.removed_at.is_(None)
969
- ).all()
970
-
971
- project_ids = [pm.project_id for pm in project_memberships]
972
- projects = db.query(Project).filter(
973
- Project.id.in_(project_ids),
974
- Project.deleted_at.is_(None)
975
- ).all() if project_ids else []
976
-
977
- assigned_projects = [
978
- ProjectContext(id=p.id, title=p.title)
979
- for p in projects
980
- ]
981
-
982
- # Determine primary project
983
- primary_project = None
984
- if assigned_projects:
985
- if user_prefs.last_active_project_id:
986
- primary_project = next(
987
- (p for p in assigned_projects if p.id == user_prefs.last_active_project_id),
988
- assigned_projects[0]
989
- )
990
- else:
991
- managed_project = next(
992
- (p for p in projects if p.primary_manager_id == current_user.id),
993
- None
994
- )
995
- if managed_project:
996
- primary_project = ProjectContext(id=managed_project.id, title=managed_project.title)
997
- else:
998
- primary_project = assigned_projects[0]
999
-
1000
- profile_data = UserProfile(
1001
- id=current_user.id,
1002
- email=current_user.email,
1003
- name=current_user.name,
1004
- phone=current_user.phone,
1005
- phone_alternate=current_user.phone_alternate,
1006
- role=current_user.role,
1007
- status=current_user.status,
1008
- is_active=current_user.is_active,
1009
- client_id=current_user.client_id,
1010
- contractor_id=current_user.contractor_id,
1011
- created_at=current_user.created_at,
1012
- updated_at=current_user.updated_at,
1013
- primary_project=primary_project,
1014
- assigned_projects=assigned_projects,
1015
- last_active_project_id=user_prefs.last_active_project_id
1016
- )
1017
-
1018
- return profile_data
1019
 
1020
 
1021
  @router.post("/change-password", response_model=MessageResponse, status_code=status.HTTP_200_OK)
@@ -1299,9 +1127,54 @@ async def update_my_preferences(
1299
  changes['new']['favorite_apps'] = update_data['favorite_apps']
1300
  preferences.favorite_apps = update_data['favorite_apps']
1301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1302
  # Update other fields
1303
  for field, value in update_data.items():
1304
- if field != 'favorite_apps' and value is not None:
1305
  old_value = getattr(preferences, field, None)
1306
  if old_value != value:
1307
  changes['old'][field] = old_value
 
844
  return current_user
845
 
846
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
847
 
848
 
849
  @router.post("/change-password", response_model=MessageResponse, status_code=status.HTTP_200_OK)
 
1127
  changes['new']['favorite_apps'] = update_data['favorite_apps']
1128
  preferences.favorite_apps = update_data['favorite_apps']
1129
 
1130
+ # Validate last_active_project_id if provided
1131
+ if 'last_active_project_id' in update_data:
1132
+ from app.models.project import Project
1133
+ from app.models.project_team import ProjectTeam
1134
+
1135
+ new_project_id = update_data['last_active_project_id']
1136
+
1137
+ # Platform admins don't have project context
1138
+ if current_user.role == 'platform_admin' and new_project_id is not None:
1139
+ raise HTTPException(
1140
+ status_code=status.HTTP_400_BAD_REQUEST,
1141
+ detail="Platform admins cannot set active project (no project assignments)"
1142
+ )
1143
+
1144
+ if new_project_id is not None:
1145
+ # Verify user is actually assigned to this project
1146
+ is_member = db.query(ProjectTeam).filter(
1147
+ ProjectTeam.user_id == current_user.id,
1148
+ ProjectTeam.project_id == new_project_id,
1149
+ ProjectTeam.deleted_at.is_(None),
1150
+ ProjectTeam.removed_at.is_(None)
1151
+ ).first()
1152
+
1153
+ if not is_member:
1154
+ raise HTTPException(
1155
+ status_code=status.HTTP_403_FORBIDDEN,
1156
+ detail="You are not assigned to this project"
1157
+ )
1158
+
1159
+ # Verify project exists and is active
1160
+ project = db.query(Project).filter(
1161
+ Project.id == new_project_id,
1162
+ Project.deleted_at.is_(None)
1163
+ ).first()
1164
+
1165
+ if not project:
1166
+ raise HTTPException(
1167
+ status_code=status.HTTP_404_NOT_FOUND,
1168
+ detail="Project not found"
1169
+ )
1170
+
1171
+ changes['old']['last_active_project_id'] = str(preferences.last_active_project_id) if preferences.last_active_project_id else None
1172
+ changes['new']['last_active_project_id'] = str(new_project_id) if new_project_id else None
1173
+ preferences.last_active_project_id = new_project_id
1174
+
1175
  # Update other fields
1176
  for field, value in update_data.items():
1177
+ if field not in ['favorite_apps', 'last_active_project_id'] and value is not None:
1178
  old_value = getattr(preferences, field, None)
1179
  if old_value != value:
1180
  changes['old'][field] = old_value
src/app/schemas/user_preferences.py CHANGED
@@ -69,6 +69,10 @@ class UserPreferencesUpdate(BaseModel):
69
  None,
70
  description="Default map center longitude"
71
  )
 
 
 
 
72
  additional_settings: Optional[Dict[str, Any]] = Field(
73
  None,
74
  description="Additional settings (sidebar_collapsed, compact_mode, etc.)"
 
69
  None,
70
  description="Default map center longitude"
71
  )
72
+ last_active_project_id: Optional[UUID] = Field(
73
+ None,
74
+ description="Last active project ID for multi-project users"
75
+ )
76
  additional_settings: Optional[Dict[str, Any]] = Field(
77
  None,
78
  description="Additional settings (sidebar_collapsed, compact_mode, etc.)"