fix: return first_name and last_name in setup-admin and signup responses

- Add first_name and last_name to select clause in setup-admin endpoint
- Add first_name and last_name to select clause in signup endpoint
- Ensures frontend receives the name fields after user creation
- Fixes issue where first/last names don't populate in UI after setup

The data was being saved to database correctly but not returned in the API response, causing frontend to not display the names properly.
This commit is contained in:
Muhammad Ibrahim
2025-09-24 20:17:36 +01:00
parent 78f4eff375
commit a479003ba9

View File

@@ -98,6 +98,8 @@ router.post('/setup-admin', [
id: true,
username: true,
email: true,
first_name: true,
last_name: true,
role: true,
created_at: true
}
@@ -523,6 +525,8 @@ router.post('/signup', [
id: true,
username: true,
email: true,
first_name: true,
last_name: true,
role: true,
is_active: true,
created_at: true