blob: e86568292b424c2613b23d2221f71892a09ce68b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package api
import (
"net/http"
"github.com/LMBishop/scrapbook/api/handler"
"github.com/LMBishop/scrapbook/pkg/config"
"github.com/LMBishop/scrapbook/pkg/index"
)
func NewMux(cfg *config.MainConfig, siteIndex *index.SiteIndex) *http.ServeMux {
mux := http.NewServeMux()
mux.HandleFunc("POST /site/{site}/upload", handler.UploadSiteVersion(cfg, siteIndex))
mux.HandleFunc("/", http.NotFoundHandler().ServeHTTP)
return mux
}
|