blob: 41d652af6cd32ac530fcf8088706d0aef66a3a8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package api
import (
"net/http"
"github.com/bosssauce/ponzu/system/db"
)
// Run adds Handlers to default http listener for API
func Run() {
http.HandleFunc("/api/types", db.CacheControl(CORS(Record(typesHandler))))
http.HandleFunc("/api/contents", db.CacheControl(CORS(Record(contentsHandler))))
http.HandleFunc("/api/content", db.CacheControl(CORS(Record(contentHandler))))
http.HandleFunc("/api/content/external", db.CacheControl(CORS(Record(externalContentHandler))))
}
|