Reserve routes for upcoming notification feeds
This commit is contained in:
parent
af89e329c4
commit
89adf2942e
@ -13,6 +13,7 @@ import (
|
|||||||
"github.com/animenotifier/notify.moe/pages/editor/jobs"
|
"github.com/animenotifier/notify.moe/pages/editor/jobs"
|
||||||
"github.com/animenotifier/notify.moe/pages/me"
|
"github.com/animenotifier/notify.moe/pages/me"
|
||||||
"github.com/animenotifier/notify.moe/pages/notifications"
|
"github.com/animenotifier/notify.moe/pages/notifications"
|
||||||
|
"github.com/animenotifier/notify.moe/pages/notifications/feed"
|
||||||
"github.com/animenotifier/notify.moe/pages/popular"
|
"github.com/animenotifier/notify.moe/pages/popular"
|
||||||
"github.com/animenotifier/notify.moe/pages/soundtrack"
|
"github.com/animenotifier/notify.moe/pages/soundtrack"
|
||||||
"github.com/animenotifier/notify.moe/pages/upload"
|
"github.com/animenotifier/notify.moe/pages/upload"
|
||||||
@ -49,4 +50,9 @@ func Register(l *layout.Layout, app *aero.Application) {
|
|||||||
|
|
||||||
// Jobs
|
// Jobs
|
||||||
app.Post("/api/job/:job/start", jobs.Start)
|
app.Post("/api/job/:job/start", jobs.Start)
|
||||||
|
|
||||||
|
// Feed
|
||||||
|
app.Get("/api/user/:id/notifications/feed", notificationsfeed.JSON)
|
||||||
|
app.Get("/api/user/:id/notifications/feed/atom", notificationsfeed.Atom)
|
||||||
|
app.Get("/api/user/:id/notifications/feed/rss", notificationsfeed.RSS)
|
||||||
}
|
}
|
||||||
|
23
pages/notifications/feed/feed.go
Normal file
23
pages/notifications/feed/feed.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package notificationsfeed
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/aerogo/aero"
|
||||||
|
)
|
||||||
|
|
||||||
|
// maxNotifications indicates how many notifications are shown in the feed.
|
||||||
|
const maxNotifications = 20
|
||||||
|
|
||||||
|
// RSS returns a notifications feed in RSS format.
|
||||||
|
func RSS(ctx *aero.Context) string {
|
||||||
|
return "reserved"
|
||||||
|
}
|
||||||
|
|
||||||
|
// JSON returns a notifications feed in JSON format.
|
||||||
|
func JSON(ctx *aero.Context) string {
|
||||||
|
return "reserved"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Atom returns a notifications feed in Atom format.
|
||||||
|
func Atom(ctx *aero.Context) string {
|
||||||
|
return "reserved"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user