[feature] Status source endpoint (#2848)

* [feature] statusSource endpoint

* finish up
This commit is contained in:
tobi 2024-04-17 14:49:20 +02:00 committed by GitHub
commit cef9924d9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 320 additions and 0 deletions

View file

@ -67,6 +67,9 @@ const (
// HistoryPath is used for fetching history of posts.
HistoryPath = BasePathWithID + "/history"
// SourcePath is used for fetching source of a post.
SourcePath = BasePathWithID + "/source"
)
type Module struct {
@ -110,4 +113,5 @@ func (m *Module) Route(attachHandler func(method string, path string, f ...gin.H
// history/edit stuff
attachHandler(http.MethodGet, HistoryPath, m.StatusHistoryGETHandler)
attachHandler(http.MethodGet, SourcePath, m.StatusSourceGETHandler)
}