Commit Graph

13 Commits

Author SHA1 Message Date
ekzyis fb7fbae699 Fix invoice polling finds no rows 2023-11-26 23:53:35 +01:00
ekzyis aa6db6a5e1 Fix foreign key constraint violation during market creation 2023-11-26 23:48:55 +01:00
ekzyis e5e9ae0667 Remove market end date from invoice description 2023-11-26 23:40:11 +01:00
ekzyis 73162155d5 Fix orphaned invoices with Tx and Context usage
txs are now rolled back on order error
2023-11-26 23:22:34 +01:00
ekzyis 9026f56359 Update TODO 2023-11-26 18:56:02 +01:00
ekzyis 50724161c2 Update invoice description 2023-11-26 18:40:57 +01:00
ekzyis bc10fe025b First create order then invoice
This should prevent that we poll for invoices that had an error during order creation.

I should probably fix this with the context package.
2023-11-26 18:40:57 +01:00
ekzyis ce64608894 Allow creation of markets 2023-11-20 02:52:08 +01:00
ekzyis 4b0d017b98 Add invoice description 2023-11-20 00:38:52 +01:00
ekzyis ebdf0d1e90 Add order form
* add POST /api/order -> 402 Payment Required
* redirect to /invoice/:id
2023-11-20 00:38:52 +01:00
ekzyis 55afc3b097 Add /market/:id route 2023-11-20 00:38:52 +01:00
ekzyis c66e96bf3f refactor: fix init and use DI
* fix init misuse which makes running tests impossible since tests are run inside a temporary test directory which breaks env loading

* use dependency injection pattern for server creation and global server context in route handlers
2023-11-03 20:34:21 +01:00
ekzyis 7558655458 refactor: Structure code into different packages
I have put too much code into the same files.

Also, I put everything into the same package: main.

This package is only meant for executables.

Therefore, I have refactored my code to use multiple packages. These packages also guarantee separation of concerns since Golang doesn't allow cyclic imports.
2023-09-10 23:13:08 +02:00