✨ News getter api
This commit is contained in:
@@ -8,12 +8,19 @@ import (
|
||||
func MapAPIs(app *fiber.App, baseURL string) {
|
||||
api := app.Group(baseURL).Name("API")
|
||||
{
|
||||
api.Get("/well-known/sources", getNewsSources)
|
||||
|
||||
admin := api.Group("/admin").Name("Admin")
|
||||
{
|
||||
admin.Post("/scan", sec.ValidatorMiddleware, adminTriggerScanTask)
|
||||
}
|
||||
|
||||
api.Get("/well-known/sources", getNewsSources)
|
||||
api.Get("/link/*", getLinkMeta)
|
||||
|
||||
news := api.Group("/news").Name("News")
|
||||
{
|
||||
news.Get("/", listNewsArticles)
|
||||
news.Get("/:hash", getNewsArticle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user