Commit Graph

15 Commits

Author SHA1 Message Date
Adrià Casajús
31896ff262
Replace black and flake8 with ruff (#1943) 2023-11-21 16:42:18 +01:00
Adrià Casajús
7cb7b48845
Ensure coupons are only used once (#1718)
* Ensure coupons are only used once

* Update test to handle redirect

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2023-05-03 16:18:46 +02:00
Adrià Casajús
7f9ce5641f
Feat: Added parallel limiter to prevent sqlalchemy transaction issues (#1360)
* Feat: Added parallel limiter to prevent sqlalchemy transaction issues

* Remove logs

* Moved initialization to its own file

* Throw exception

* Added test

* Add redis to gh actions

* Added v6 to the name

* Removed debug prints

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-10-27 10:07:02 +02:00
Adrià Casajús
99ce10a1bc
Send email to users with a subscription and a partner plan upgrade (#1101)
* Send email to users with a subscription and a partner plan upgrade

* Update double-subscription-partner.html

* Update double-subscription-partner.txt.jinja2

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son Nguyen Kim <nguyenkims@users.noreply.github.com>
2022-06-20 14:34:20 +02:00
Son
54e78786b0 no need to notify admin when someone uses a coupon 2022-05-15 19:57:45 +02:00
Son
c356c75494 show coupon expires date when user buys a coupon 2021-11-26 18:20:46 +01:00
Son
4d0f6811b2 error if coupon is expired 2021-11-26 18:11:03 +01:00
Son
55ae61527d user can buy 1-year coupon 2021-11-22 16:30:27 +01:00
Son
d2ed9337f1 add coupon comment in notification 2021-11-19 16:40:52 +01:00
Son
324cc8734b handle the case user mistakenly use a lifetime coupon on the coupon page 2021-11-12 17:53:56 +01:00
Son
372466ab06 do not use flask-sqlalchemy
- add __tablename__ for all models
- use sa and orm instead of db
- rollback all changes in tests
- remove session in @app.teardown_appcontext
2021-10-12 14:36:47 +02:00
Son Nguyen Kim
f3cff1f1bf create manual subscription using the coupon.is_giveaway info 2021-09-07 15:36:19 +02:00
Son Nguyen Kim
b5c827c2ea handle case user already has an active subscription via another channel (Paddle, Apple, etc) on coupon page 2021-08-21 16:04:32 +02:00
Son Nguyen Kim
513f5cd4fb rename 2021-08-21 15:55:22 +02:00
Son Nguyen Kim
601385a0c1 add coupon 2021-07-13 08:54:37 +02:00