mirror of
https://github.com/rancher/norman.git
synced 2025-06-22 05:27:22 +00:00
21 lines
344 B
Go
21 lines
344 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/rancher/norman/types"
|
|
)
|
|
|
|
func DeleteHandler(request *types.APIContext) error {
|
|
store := request.Schema.Store
|
|
if store != nil {
|
|
err := store.Delete(request, request.Schema, request.ID)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
request.WriteResponse(http.StatusNoContent, nil)
|
|
return nil
|
|
}
|