public function deleteSnippet($data) {
        $response=CodeBank_ClientAPI::responseBase();
        
        try {
            $snippet=Snippet::get()->byID(intval($data->id));
            if(!empty($snippet) && $snippet!==false && $snippet->ID!=0) {
                if($snippet->canDelete()==false) {
                    $response['status']="EROR";
                    $response['message']="Not authorized";
                    
                    return $response;
                }
                
                
                //Delete the snippet
                $snippet->delete();
                
                
                $response['status']='HELO';
            }else {
                $response['status']='EROR';
                $response['message']=_t('CodeBankAPI.SNIPPET_NOT_FOUND', '_Snippet not found');
            }
        }catch(Exception $e) {
            $response['status']="EROR";
            $response['message']="Internal Server error occured";
        }
        
        return $response;
    }