Barcode Betty
c68838acf2
Fix ruff lint errors across codebase
...
CI / lint (pull_request) Successful in 5s
CI / typecheck (pull_request) Failing after 29s
CI / test (pull_request) Failing after 48s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
- Auto-fix F401 (unused imports) and I001 (unsorted imports) with ruff --fix
- Manually fix E501 (line too long) in alembic migrations and src/ models
- Run ruff format to ensure consistent formatting
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-23 22:47:17 +00:00
Pawla Abdul
5c8fe9a62b
fix(api): make alembic migrations idempotent for fresh databases
...
- 001: guard has_table check; skip if session_data already TEXT
- 002: guard each ADD COLUMN / CREATE TABLE; guard password migration
- 003: guard has_table; guard nullable check
- 004: guard has_table; skip if users.id already TEXT
- env.py: add Base.metadata.create_all after run_migrations to bootstrap fresh DBs
- api/user.py: make hashed_password nullable; add email_verified, image, email_inbound_token fields
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-04 16:28:29 +00:00
CartSnitch Engineer Bot
bbbf97d027
fix(api): revert auth/type regressions from standalone sync, keep email-in feature only
...
- Revert auth/dependencies.py to cookie+Bearer dual auth with str user IDs
- Add GET /auth/me/email-in-address endpoint for receipt email routing
- Update User model: add email_inbound_token, change id/store_id/user_id to str
- Update AuthService and UserResponse to use str user IDs
- Update route count test: 33 -> 34 routes
- Restore e2e test for email-in-address endpoint
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-03 09:40:39 +00:00
Barcode Betty
b52fae5894
sync(api): copy latest standalone code and merge alembic migrations
...
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-03 07:54:31 +00:00
Stockboy Steve
a1d53f8e47
fix: change users.id and FK columns from uuid to text for Better-Auth compatibility
...
Better-Auth generates nanoid-style text IDs (e.g. pGud2ln2WAFHC0KYjBVKR4Rc7mM8OcTI),
but the users table used PostgreSQL uuid type, causing registration failures:
ERROR: invalid input syntax for type uuid: "pGud2ln2WAFHC0KYjBVKR4Rc7mM8OcTI"
Changes:
- User.id: removed UUIDPrimaryKeyMixin, use explicit text PK
- UserStoreAccount.user_id: Mapped[uuid.UUID] -> Mapped[str]
- Purchase.user_id: Mapped[uuid.UUID] -> Mapped[str]
- UserResponse schema: id field from UUID -> str
- New Alembic migration 004_fix_user_id_text: drops FKs, alters column
types, re-adds FKs (using id::text cast)
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-03-31 17:56:13 +00:00
Coupon Carl
b7e6f637a7
feat: merge cartsnitch/api into api/ subdirectory
...
Consolidate API gateway service into monorepo.
Squashed from https://github.com/cartsnitch/api main (89bacb1).
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-03-28 02:24:02 +00:00