This repository has been archived on 2023-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
imagini/internal/api/media_items.go

27 lines
590 B
Go
Raw Normal View History

2021-01-16 22:00:17 +00:00
package api
import (
"net/http"
)
func (api *API) mediaItemsHandler(w http.ResponseWriter, r *http.Request) {
2021-01-19 21:26:10 +00:00
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() {
2021-01-16 22:00:17 +00:00
}