✨ Read news basis
✨ Able to read wordpress site
btw the 10 yrs ago package still work properly, amazing...
means the wordpress api did not change a lot and the golang backward
compability is amazing!
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
func MapAPIs(app *fiber.App, baseURL string) {
|
||||
api := app.Group(baseURL).Name("API")
|
||||
{
|
||||
api.Get("/well-known/sources", getNewsSources)
|
||||
api.Get("/link/*", getLinkMeta)
|
||||
}
|
||||
}
|
||||
|
10
pkg/internal/server/api/well_known_api.go
Normal file
10
pkg/internal/server/api/well_known_api.go
Normal file
@ -0,0 +1,10 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"git.solsynth.dev/hypernet/reader/pkg/internal/services"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func getNewsSources(c *fiber.Ctx) error {
|
||||
return c.JSON(services.NewsSources)
|
||||
}
|
Reference in New Issue
Block a user