summaryrefslogtreecommitdiff
path: root/system/api/server.go
blob: 44683947505622f040d23c3aa6caefc169907a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package api

import (
	"net/http"
)

// Run adds Handlers to default http listener for API
func Run() {
	http.HandleFunc("/api/types", CORS(Record(typesHandler)))

	http.HandleFunc("/api/posts", CORS(Record(postsHandler)))

	http.HandleFunc("/api/post", CORS(Record(postHandler)))

	http.HandleFunc("/api/external/posts", CORS(Record(externalPostsHandler)))
}