[cogenda-web] [skip ci] - Add destroy resource api & refactor code.