My suggestion would be to try to refactor what you have to remove duplication and to reduce the number of return @ , and make the code a bit more declarative. I think this might be more valuable than turning things into microservices.
You've also got some directory traversal vulnerabilities I think.
Usually a microservice architecture is valuable when services lie in a different context, or have differing scale, response time, security or criticality properties, but I dont think that applies here.
Good luck!