Commit Graph

39 Commits

Author SHA1 Message Date
3f6240b6bd Fix: Add missing assignment_type field to chore API response
Fixed get_chore_with_assignments() to include assignment_type in dict.
This resolves the ResponseValidationError where assignment_type was
missing from API responses despite being present in the database.
2026-02-04 13:41:14 +11:00
7d0a5d0423 Add ChoreAssignmentType enum and assignment_type field to Chore model
- NEW: ChoreAssignmentType enum (ANY_ONE, ALL_ASSIGNED)
- NEW: assignment_type field with default ANY_ONE
- ANY_ONE: Only one assigned person needs to complete
- ALL_ASSIGNED: All assigned people must complete
- Supports new chore completion logic for multi-user assignments
2026-02-02 21:39:29 +11:00
a41132c411 Add avatar_url and birthday fields to user schemas for image upload and birthday filtering 2026-02-02 12:24:05 +11:00
e079baa865 Fix: Convert empty string to None for due_date field in update_chore
When updating a chore with an empty due_date field, SQLite was throwing an error
because it only accepts Python datetime and date objects, not empty strings.

This fix checks if due_date is an empty string and converts it to None before
setting the attribute, preventing the TypeError.

Error fixed: "SQLite DateTime type only accepts Python datetime and date objects as input"
2026-02-02 11:48:36 +11:00
0c5dbb7ad7 Add points field to Chore model to support point-based reward system 2026-02-01 13:30:44 +11:00
b351c216b3 Fix: Add ENVIRONMENT and CORS_ORIGINS fields to Settings class
- Added ENVIRONMENT field (str, default: "development") to match .env file
- Renamed ALLOWED_ORIGINS to CORS_ORIGINS to match .env file
- Updated cors_origins property to use CORS_ORIGINS instead of ALLOWED_ORIGINS
- Fixes Pydantic validation error when loading settings from .env
2026-01-31 22:57:54 +11:00
99f0c694bd Add GET /api/v1/users endpoint for admin to list all users 2026-01-28 17:40:33 +11:00
aede5167d8 Add user profile update endpoints (self-update and admin update) 2026-01-28 17:26:04 +11:00
00230f9994 Add field validator to accept date strings and convert to datetime 2026-01-28 17:25:40 +11:00
dfdc1d83be Add discord_id and profile_picture to user schemas, add UserAdminUpdate for admin actions 2026-01-28 17:22:12 +11:00
2d5a7076f1 Add discord_id and profile_picture fields to User model 2026-01-28 17:21:47 +11:00
b76fcbdb84 Update ChoreFrequency enum: replace adhoc with on_trigger 2026-01-28 17:04:31 +11:00
3f73ead13f Change email field from EmailStr to str to allow .local domains 2026-01-28 15:14:04 +11:00
6099b87db9 Add 10.0.0.127:5173 to CORS allowed origins 2026-01-28 12:01:36 +11:00
1f58169043 Import both User and Chore models to fix relationships 2026-01-28 08:23:59 +11:00
7eb45c8b93 Fix User-Chore relationship with lazy loading 2026-01-28 08:23:46 +11:00
fb53891bc2 Fix import: get_current_user from auth module not security 2026-01-27 23:05:11 +11:00
9ce049abb5 Add chores router to main app 2026-01-27 22:28:01 +11:00
ecf14bda69 Add chores API endpoints with CRUD operations 2026-01-27 22:27:41 +11:00
08192a089e Add chore schemas for API requests/responses 2026-01-27 22:26:48 +11:00
54b9d96850 Update main.py to use cors_origins property 2026-01-26 22:18:48 +11:00
6d83d89073 Fix ALLOWED_ORIGINS to accept comma-separated string 2026-01-26 22:17:18 +11:00
370b600916 Add user management endpoints 2026-01-26 21:56:52 +11:00
b0349f641e Add authentication endpoints 2026-01-26 21:56:38 +11:00
5dcdee7afd Add api/v1 __init__.py 2026-01-26 21:56:24 +11:00
1eea6692e8 Add api __init__.py 2026-01-26 21:56:20 +11:00
c84e173a7f Add Auth schemas 2026-01-26 21:56:15 +11:00
e74f5d717f Add User schemas 2026-01-26 21:56:10 +11:00
742a9c9880 Add schemas __init__.py 2026-01-26 21:56:04 +11:00
5a022ebcb2 Add Meal model 2026-01-26 21:55:58 +11:00
0a17ecf1a8 Add Chore model 2026-01-26 21:55:51 +11:00
5d79f10f85 Add User model 2026-01-26 21:55:43 +11:00
c87dd94ef8 Add models __init__.py 2026-01-26 21:55:35 +11:00
15d13d5225 Add security utilities 2026-01-26 21:55:30 +11:00
93a65fb29d Add database configuration 2026-01-26 21:55:21 +11:00
5619820413 Add core __init__.py 2026-01-26 21:55:14 +11:00
dc20f50fa2 Add core configuration 2026-01-26 21:55:09 +11:00
d4a691bb1e Add app __init__.py 2026-01-26 21:55:02 +11:00
48e1ea9f6b Add main FastAPI application 2026-01-26 21:54:58 +11:00