2022-11-18 21:25:40 +01:00
|
|
|
package handler
|
|
|
|
|
|
|
|
import (
|
2023-01-06 00:39:21 +01:00
|
|
|
primarydb "blackforestbytes.com/simplecloudnotifier/db/impl/primary"
|
2022-11-18 21:25:40 +01:00
|
|
|
"blackforestbytes.com/simplecloudnotifier/logic"
|
|
|
|
)
|
|
|
|
|
|
|
|
type APIHandler struct {
|
2022-11-19 15:13:47 +01:00
|
|
|
app *logic.Application
|
2023-01-06 00:39:21 +01:00
|
|
|
database *primarydb.Database
|
2022-11-19 15:13:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewAPIHandler(app *logic.Application) APIHandler {
|
|
|
|
return APIHandler{
|
|
|
|
app: app,
|
2023-01-06 00:39:21 +01:00
|
|
|
database: app.Database.Primary,
|
2022-11-19 15:13:47 +01:00
|
|
|
}
|
2022-11-18 21:25:40 +01:00
|
|
|
}
|