4 Commits

Author SHA1 Message Date
708a8d0588
Adds CORS protocol to server responses
All checks were successful
Go / build (1.21) (pull_request) Successful in 12s
Go / build (1.22) (pull_request) Successful in 11s
Go / build (1.21) (push) Successful in 12s
Go / build (1.22) (push) Successful in 11s
Allow requests from all endpoints. Currently it is only running on
localhost.
It is required by the react's fetching lib used.
2025-03-23 19:51:46 +00:00
4c82ca0e2b
Implements /transactions POST method
It adds the method to the OpenAPI spec and generates a new server
config. The requirement for the ID on the Transaction component is
removed, so that it can be reused for insertions.
It also adds two new middlewares, a logging and a spec validator. If a
request does not follow the spec, a 400 is returned immediately.

Issue: #18
2024-06-22 20:11:52 +01:00
a52bca5882
Adapt API implementation with DAL interface
Swap direct access to the DB on the API server with an data abstraction
layer.
Implement each API type converter separately and revert changes to the
auto-generated server implementation types.

Add error return to DAL methods. Implement `Transactions`.

Add tools.go with oapi-codegen and mockgen.
https://www.jvt.me/posts/2022/06/15/go-tools-dependency-management/

Update go packages.

Issues #5, #12
2024-05-12 22:16:24 +01:00
86036afa4e
API server online and DB connection established
Introduces the api-server/main.go, which creates the echo server,
connects it to the implemented handlers and runs it.

Fix the SQL query to retrieved transactions w/ categories.

Issues #6 and #7
2024-03-23 16:51:07 +00:00