mirror of
https://github.com/rancher/norman.git
synced 2025-09-27 15:44:10 +00:00
More initial dev
This commit is contained in:
20
api/handlers/delete.go
Normal file
20
api/handlers/delete.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package handlers
|
||||
|
||||
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