new model and endpoints..

This commit is contained in:
samantha42
2026-03-28 08:33:12 +01:00
parent c2276b6e13
commit 31108a16d0
3 changed files with 61 additions and 1 deletions

View File

@@ -50,12 +50,17 @@ func main() {
//Trades
mux.HandleFunc("POST /trade/add", handlers.AddTradeHandler(db))
mux.HandleFunc("GET /trade/list", handlers.GetTradeListHandler(db))
mux.HandleFunc("GET /trade/search", handlers.GetTradeListHandler(db)) // new
//Positions
mux.HandleFunc("GET /positions/list", handlers.GetPositionListHandler(db))
mux.HandleFunc("GET /positions/closed/list", handlers.GetPositionListHandler(db)) // new
mux.HandleFunc("GET /positions/closed/search", handlers.GetTradeListHandler(db)) // new
// Company
mux.HandleFunc("POST /company/add", handlers.AddCompanyHandler(db))
mux.HandleFunc("GET /company/list", handlers.GetCompaniesHandler(db))
mux.HandleFunc("GET /company/revenue/categories", handlers.GetCompanyRevenueCategories(db))
mux.HandleFunc("POST /company/S-O/add", handlers.GetCompaniesHandler(db)) // new
mux.HandleFunc("GET /company/S-O/list", handlers.GetCompaniesHandler(db)) // new
// Currency
mux.HandleFunc("GET /currency/list", handlers.GetCurrenciesHandler(db))