Court told garda career ruined after caught dealing drugs