updated server.controller of crud