Skip to content

Conversation

rohitdhakane6
Copy link
Contributor

This pull request includes significant changes to the backend application, particularly in handling webhooks and user credits. The most important changes include adding credit checks before AI model training, refactoring webhook routes, and updating database schema to add relations between User and UserCredit.

Enhancements to credit checks:

  • Added logic to check user credits before AI model training in apps/backend/index.ts.

Refactoring webhook routes:

  • Moved webhook routes for AI model training and image generation to apps/backend/routes/webhook.routes.ts and updated their URLs (apps/backend/models/FalAIModel.ts) [1] [2] [3].

Database schema updates:

  • Added a foreign key constraint to UserCredit to reference User and included the relation in the Prisma schema (packages/db/prisma/migrations/20250225175603_add_relation_usercredit_to_user/migration.sql, packages/db/prisma/schema.prisma) [1] [2] [3].

Code style improvements:

  • Fixed code formatting and added missing return statements in apps/backend/index.ts and apps/backend/routes/webhook.routes.ts [1] [2] [3].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant