Skip to content

Commit

Permalink
Merge pull request #94 from tjmlabs/upsert-webhook
Browse files Browse the repository at this point in the history
Add webhooks for use with document upsert
  • Loading branch information
Jonathan-Adly authored Nov 21, 2024
2 parents 881d399 + 204aabb commit 665e86b
Show file tree
Hide file tree
Showing 9 changed files with 564 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
AWS_S3_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }}
SVIX_TOKEN: ${{ secrets.SVIX_TOKEN }}
GOTENBERG_URL: http://localhost:3000
REDIS_URL: redis://localhost:6379/0
run: pytest --cov-fail-under=50
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
AWS_S3_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }}
SVIX_TOKEN: ${{ secrets.SVIX_TOKEN }}
DATABASE_URL: postgres://test_user:test_password@localhost:5432/test_db
GOTENBERG_URL: http://localhost:3000
run: pytest
Expand Down
18 changes: 18 additions & 0 deletions web/accounts/migrations/0003_customuser_svix_application_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2024-11-15 15:53

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0002_customuser_token'),
]

operations = [
migrations.AddField(
model_name='customuser',
name='svix_application_id',
field=models.CharField(blank=True, max_length=255),
),
]
18 changes: 18 additions & 0 deletions web/accounts/migrations/0004_customuser_svix_endpoint_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2024-11-20 22:37

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0003_customuser_svix_application_id'),
]

operations = [
migrations.AddField(
model_name='customuser',
name='svix_endpoint_id',
field=models.CharField(blank=True, max_length=255),
),
]
2 changes: 2 additions & 0 deletions web/accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class CustomUser(AbstractUser):
tier = models.CharField(max_length=50, choices=TIER, default="free")
stripe_customer_id = models.CharField(max_length=255, blank=True)
stripe_subscription_id = models.CharField(max_length=255, blank=True)
svix_application_id = models.CharField(max_length=255, blank=True)
svix_endpoint_id = models.CharField(max_length=255, blank=True)
token = models.CharField(max_length=255, blank=True)

def __str__(self) -> str:
Expand Down
Loading

0 comments on commit 665e86b

Please sign in to comment.