move variable from route to router
created ContentTypeHandler to accept only JSON