27 lines
590 B
Go
27 lines
590 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func (api *API) mediaItemsHandler(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method == http.MethodPost {
|
|
// CREATE
|
|
} else if r.Method == http.MethodPut {
|
|
// UPDATE / REPLACE
|
|
} else if r.Method == http.MethodPatch {
|
|
// UPDATE / MODIFY
|
|
} else if r.Method == http.MethodDelete {
|
|
// DELETE
|
|
} else if r.Method == http.MethodGet {
|
|
// GET
|
|
} else {
|
|
errorJSON(w, "Method is not supported.", http.StatusMethodNotAllowed)
|
|
return
|
|
}
|
|
}
|
|
|
|
func (api *API) createMediaitem() {
|
|
|
|
}
|