1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-31 23:02:01 +00:00
Files
norman/api/handler/delete.go

21 lines
344 B
Go
Raw Normal View History

2017-11-21 13:46:30 -07:00
package handler
2017-11-10 21:44:02 -07:00
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
}
}
2017-11-28 14:28:25 -07:00
request.WriteResponse(http.StatusNoContent, nil)
2017-11-10 21:44:02 -07:00
return nil
}