[api] remove code duplication in comments controller (and remove tabs)