22 lines
316 B
Go
22 lines
316 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func Certs(w http.ResponseWriter, r *http.Request) {
|
|
switch r.Method {
|
|
case "GET":
|
|
GetCerts(w, r)
|
|
return
|
|
case "POST":
|
|
CreateCert(w, r)
|
|
return
|
|
case "DELETE":
|
|
DeleteCert(w, r)
|
|
return
|
|
default:
|
|
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
|
}
|
|
}
|