mirror of
https://github.com/rancher/norman.git
synced 2025-09-09 02:59:19 +00:00
Subcontext and mapping updates
This commit is contained in:
20
api/handler/delete.go
Normal file
20
api/handler/delete.go
Normal file
@@ -0,0 +1,20 @@
|
||||
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.StatusOK, nil)
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user