mirror of
https://github.com/minio/minio.git
synced 2025-11-13 07:11:44 -05:00
JSONrpc: implement removeObject RPC call
This commit is contained in:
@@ -214,6 +214,20 @@ func (web *WebAPI) GetObjectURL(r *http.Request, args *GetObjectURLArgs, reply *
|
||||
return nil
|
||||
}
|
||||
|
||||
// RemoveObject - removes an object.
|
||||
func (web *WebAPI) RemoveObject(r *http.Request, args *RemoveObjectArgs, reply *int) error {
|
||||
if !isAuthenticated(r) {
|
||||
return errUnAuthorizedRequest
|
||||
}
|
||||
|
||||
e := web.Client.RemoveObject(args.BucketName, args.ObjectName)
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
*reply = 0
|
||||
return nil
|
||||
}
|
||||
|
||||
// Login - user login handler.
|
||||
func (web *WebAPI) Login(r *http.Request, args *LoginArgs, reply *AuthToken) error {
|
||||
jwt := InitJWT()
|
||||
|
||||
Reference in New Issue
Block a user