mirror of
https://github.com/zoriya/vex.git
synced 2026-08-16 02:44:55 +00:00
Add /entries
This commit is contained in:
+3
-5
@@ -17,15 +17,11 @@ import (
|
||||
|
||||
type Handler struct {
|
||||
feeds vex.FeedService
|
||||
entries vex.EntryService
|
||||
users vex.UserService
|
||||
jwtSecret []byte
|
||||
}
|
||||
|
||||
func (h *Handler) GetEntries(c echo.Context) error {
|
||||
ret := make([]interface{}, 0)
|
||||
return c.JSON(200, ret)
|
||||
}
|
||||
|
||||
type Validator struct {
|
||||
validator *validator.Validate
|
||||
}
|
||||
@@ -53,6 +49,7 @@ func main() {
|
||||
}
|
||||
h := Handler{
|
||||
feeds: vex.NewFeedService(db),
|
||||
entries: vex.NewEntryService(db),
|
||||
users: vex.NewUserService(db),
|
||||
jwtSecret: []byte(os.Getenv("JWT_SECRET")),
|
||||
}
|
||||
@@ -68,6 +65,7 @@ func main() {
|
||||
|
||||
e.GET("/entries", h.GetEntries)
|
||||
h.RegisterLoginRoutes(e, r)
|
||||
h.RegisterEntriesRoutes(e, r)
|
||||
h.RegisterFeedsRoutes(e, r)
|
||||
|
||||
e.Start(":1597")
|
||||
|
||||
Reference in New Issue
Block a user