92 lines
2.3 KiB
Go
92 lines
2.3 KiB
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func (h *coreHandlers) serverSCUMPlayers(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMSquads(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMSquadMembers(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMVehicles(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMFlags(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMPositions(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMOperations(w http.ResponseWriter, r *http.Request) {
|
|
switch r.Method {
|
|
case http.MethodGet, http.MethodPost:
|
|
writeRemovedSCUMEndpoint(w)
|
|
default:
|
|
writeMethodNotAllowed(w, "GET, POST")
|
|
}
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMOperationApprove(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodPost {
|
|
writeMethodNotAllowed(w, http.MethodPost)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMWorkflows(w http.ResponseWriter, r *http.Request) {
|
|
switch r.Method {
|
|
case http.MethodGet, http.MethodPost:
|
|
writeRemovedSCUMEndpoint(w)
|
|
default:
|
|
writeMethodNotAllowed(w, "GET, POST")
|
|
}
|
|
}
|
|
|
|
func (h *coreHandlers) serverSCUMWorkflowSteps(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
writeMethodNotAllowed(w, http.MethodGet)
|
|
return
|
|
}
|
|
writeRemovedSCUMEndpoint(w)
|
|
}
|
|
|
|
func writeRemovedSCUMEndpoint(w http.ResponseWriter) {
|
|
writeAPIError(w, http.StatusNotFound, errorCodeNotFound, "legacy SCUM endpoint removed; use the local SCUM management APIs", nil)
|
|
}
|